(self)
| 9 | |
| 10 | class YamlFile(pytest.File): |
| 11 | def collect(self): |
| 12 | # We need a yaml parser, e.g. PyYAML. |
| 13 | import yaml |
| 14 | |
| 15 | raw = yaml.safe_load(self.path.open()) |
| 16 | for name, spec in sorted(raw.items()): |
| 17 | yield YamlItem.from_parent(self, name=name, spec=spec) |
| 18 | |
| 19 | |
| 20 | class YamlItem(pytest.Item): |
nothing calls this directly
no test coverage detected