MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / test_file

Function test_file

src/ifcopenshell-python/test/test_validate.py:31–41  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

29 glob.glob(os.path.join(os.path.dirname(__file__), "fixtures/validate/*.ifc")),
30)
31def 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
44if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

skipMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected