Skip to content

Commit

Permalink
test: sort the SVG tests by device name
Browse files Browse the repository at this point in the history
Fixed version of commit 4e4910d ("test: sort the SVG test list")
  • Loading branch information
whot committed Oct 27, 2024
1 parent b09f066 commit 994aa6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def has_item(self, id: str, classes: Optional[List[str]] = None):
" "
), f"Missing class '{klass}' for {id}. Have: {node.get('class')}"

@property
def name(self):
return self.device.name


def is_autogenerated(svg_filename: Path):
tabletfile = datadir() / svg_filename.name.replace(".svg", ".tablet")
Expand All @@ -81,6 +85,7 @@ def pytest_generate_tests(metafunc):
for d in devices
if d.layout_filename
]
devices = sorted(devices, key=lambda d: d.name)

def filenames(devices: List[SvgDevice]) -> List[str]:
return [Path(d.device.layout_filename).name for d in devices]
Expand Down

0 comments on commit 994aa6d

Please sign in to comment.