mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 02:49:12 +00:00
Test files
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
|
||||
FILE_NAME('','2022-10-02T14:16:07',(),(),'IfcOpenShell 0.7.0','IfcOpenShell 0.7.0','');
|
||||
FILE_SCHEMA(('IFC4'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1=IFCSIUNIT($,.LENGTHUNIT.,$,.METRE.);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
@@ -0,0 +1,10 @@
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
|
||||
FILE_NAME('','2022-10-02T14:16:07',(),(),'IfcOpenShell 0.7.0','IfcOpenShell 0.7.0','');
|
||||
FILE_SCHEMA(('IFC4'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1=IFCSIUNIT(*,.LENGTHUNIT.,*,.METRE.);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
@@ -0,0 +1,10 @@
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
|
||||
FILE_NAME('','2022-10-02T14:16:07',(),(),'IfcOpenShell 0.7.0','IfcOpenShell 0.7.0','');
|
||||
FILE_SCHEMA(('IFC4'));
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
@@ -31,11 +31,14 @@ import ifcopenshell.validate
|
||||
def test_file(file):
|
||||
logger = ifcopenshell.validate.json_logger()
|
||||
ifcopenshell.validate.validate(file, logger)
|
||||
if file.startswith("fail-"):
|
||||
print()
|
||||
for x in logger.statements:
|
||||
print(x['message'])
|
||||
if os.path.basename(file).startswith("fail-"):
|
||||
assert len(logger.statements) > 0
|
||||
if file.startswith("pass-"):
|
||||
if os.path.basename(file).startswith("pass-"):
|
||||
assert len(logger.statements) == 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main(["-sx", __file__])
|
||||
pytest.main(["-svx", __file__])
|
||||
|
||||
Reference in New Issue
Block a user