mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
Converting brickschema projects to IFC libraries now works on IFC2X3
This commit is contained in:
@@ -70,12 +70,19 @@ class TestConvertBrickProject:
|
||||
def test_run(self, ifc, brick):
|
||||
brick.get_brick_path_name().should_be_called().will_return("foo.ttl")
|
||||
ifc.run("library.add_library", name="foo.ttl").should_be_called().will_return("library")
|
||||
ifc.get_schema().should_be_called().will_return("IFC4")
|
||||
brick.get_brick_path().should_be_called().will_return("/path/to/foo.ttl")
|
||||
ifc.run(
|
||||
"library.edit_library", library="library", attributes={"Location": "/path/to/foo.ttl"}
|
||||
).should_be_called()
|
||||
subject.convert_brick_project(ifc, brick)
|
||||
|
||||
def test_not_editing_in_ifc2x3(self, ifc, brick):
|
||||
brick.get_brick_path_name().should_be_called().will_return("foo.ttl")
|
||||
ifc.run("library.add_library", name="foo.ttl").should_be_called().will_return("library")
|
||||
ifc.get_schema().should_be_called().will_return("IFC2X3")
|
||||
subject.convert_brick_project(ifc, brick)
|
||||
|
||||
|
||||
class TestAssignBrickReference:
|
||||
def test_assigning_to_a_new_reference(self, ifc, brick):
|
||||
|
||||
@@ -63,6 +63,10 @@ class TestExportBrickAttributes(NewFile):
|
||||
def test_run(self):
|
||||
assert subject.export_brick_attributes("ex:#floor") == {"Identification": "ex:#floor", "Name": "floor"}
|
||||
|
||||
def test_run_ifc2x3(self):
|
||||
tool.Ifc.set(ifcopenshell.file(schema="IFC2X3"))
|
||||
assert subject.export_brick_attributes("ex:#floor") == {"ItemReference": "ex:#floor", "Name": "floor"}
|
||||
|
||||
|
||||
class TestGetBrickPath(NewFile):
|
||||
def test_run(self):
|
||||
|
||||
Reference in New Issue
Block a user