diff --git a/test/test_svg.py b/test/test_svg.py index 5113750b..e4b10e6b 100644 --- a/test/test_svg.py +++ b/test/test_svg.py @@ -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") @@ -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]