(file)
| 29 | glob.glob(os.path.join(os.path.dirname(__file__), "fixtures/validate/*.ifc")), |
| 30 | ) |
| 31 | def test_file(file): |
| 32 | logger = ifcopenshell.validate.json_logger() |
| 33 | try: |
| 34 | ifcopenshell.validate.validate(file, logger) |
| 35 | except ifcopenshell.SchemaError as e: |
| 36 | pytest.skip() |
| 37 | file = os.path.basename(file) |
| 38 | if file.startswith("fail-"): |
| 39 | assert len(logger.statements) > 0 |
| 40 | if file.startswith("pass-"): |
| 41 | assert len(logger.statements) == 0 |
| 42 | |
| 43 | |
| 44 | if __name__ == "__main__": |