Skip to content

Commit

Permalink
test: add ids to the parametrized tablet file tests
Browse files Browse the repository at this point in the history
This now useds the tablet file name as part of the test name
as opposed to the less-useful "tabletfile123":
    test/test_data_files.py::test_svg_exists[dtk-1651.tablet] PASSED                                                                                                                                                                                                                                                                                      [ 48%]
  • Loading branch information
whot committed May 8, 2024
1 parent 668f48e commit 86c5c6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_data_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def pytest_generate_tests(metafunc):
# for any function that takes a "tabletfile" argument return the path to
# a tablet file
if "tabletfile" in metafunc.fixturenames:
metafunc.parametrize("tabletfile", [f for f in datadir().glob("*.tablet")])
files = [f for f in datadir().glob("*.tablet")]
metafunc.parametrize("tabletfile", files, ids=[f.name for f in files])


def test_device_match(tabletfile):
Expand Down

0 comments on commit 86c5c6e

Please sign in to comment.