From e8d6f122f377fe5d45a6b8264b9b3fe047fe60e3 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 6 Jul 2023 20:56:20 +1000 Subject: [PATCH] See #3126. Forgot to commit tests related to explicit schema versions. --- src/ifcopenshell-python/test/test_file.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ifcopenshell-python/test/test_file.py b/src/ifcopenshell-python/test/test_file.py index 8f5f9422c8..3fb609f434 100644 --- a/src/ifcopenshell-python/test/test_file.py +++ b/src/ifcopenshell-python/test/test_file.py @@ -156,6 +156,20 @@ class TestFile(test.bootstrap.IFC4): def test_creating_a_new_file(self): f = ifcopenshell.file(schema="IFC4") assert f.schema == "IFC4" + assert f.schema_identifier == "IFC4" + assert f.schema_version == (4, 0, 0, 0) + + def test_creating_an_ifc4x3_file(self): + f = ifcopenshell.file(schema="IFC4X3") + assert f.schema == "IFC4X3" + assert f.schema_identifier == "IFC4X3_ADD1" + assert f.schema_version == (4, 3, 1, 0) + + def test_creating_a_specific_version(self): + f = ifcopenshell.file(schema_version=(4, 3, 0, 1)) + assert f.schema == "IFC4X3_TC1" + assert f.schema_identifier == "IFC4X3_TC1" + assert f.schema_version == (4, 3, 0, 1) def test_creating_an_entity(self): element = self.file.create_entity("IfcPerson")