mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Run black on IfcOpenShell-python.
This commit is contained in:
@@ -3,6 +3,7 @@ import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestAddStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
def test_adding_a_structural_analysis_model(self):
|
||||
subject = ifcopenshell.api.run("structural.add_structural_analysis_model", self.file)
|
||||
|
||||
+2
-5
@@ -3,15 +3,12 @@ import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestAssignStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
def test_assigning_a_structural_analysis_model(self):
|
||||
subject = ifcopenshell.api.run("structural.add_structural_analysis_model", self.file)
|
||||
product = ifcopenshell.api.run(
|
||||
"root.create_entity",
|
||||
self.file,
|
||||
ifc_class="IfcStructuralMember",
|
||||
predefined_type=None,
|
||||
name=None
|
||||
"root.create_entity", self.file, ifc_class="IfcStructuralMember", predefined_type=None, name=None
|
||||
)
|
||||
rel = ifcopenshell.api.run(
|
||||
"structural.assign_structural_analysis_model",
|
||||
|
||||
@@ -3,6 +3,7 @@ import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestEditStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
def test_editing_a_structural_analysis_model(self):
|
||||
subject = ifcopenshell.api.run("structural.add_structural_analysis_model", self.file)
|
||||
@@ -10,10 +11,7 @@ class TestEditStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
"structural.edit_structural_analysis_model",
|
||||
self.file,
|
||||
structural_analysis_model=subject,
|
||||
attributes={
|
||||
"Name": "My edited model",
|
||||
"Description": "Description of my model"
|
||||
}
|
||||
attributes={"Name": "My edited model", "Description": "Description of my model"},
|
||||
)
|
||||
models = self.file.by_type("IfcStructuralAnalysisModel")
|
||||
assert subject == models[0]
|
||||
|
||||
+1
-1
@@ -3,6 +3,7 @@ import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestRemoveStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
def test_removing_a_structural_analysis_model(self):
|
||||
subject = ifcopenshell.api.run("structural.add_structural_analysis_model", self.file)
|
||||
@@ -10,7 +11,6 @@ class TestRemoveStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
"structural.remove_structural_analysis_model",
|
||||
self.file,
|
||||
structural_analysis_model=subject,
|
||||
|
||||
)
|
||||
models = self.file.by_type("IfcStructuralAnalysisModel")
|
||||
assert len(models) == 0
|
||||
|
||||
+2
-5
@@ -3,15 +3,12 @@ import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestUnassignStructuralAnalysisModel(test.bootstrap.IFC4):
|
||||
def test_unassigning_a_structural_analysis_model(self):
|
||||
subject = ifcopenshell.api.run("structural.add_structural_analysis_model", self.file)
|
||||
product = ifcopenshell.api.run(
|
||||
"root.create_entity",
|
||||
self.file,
|
||||
ifc_class="IfcStructuralMember",
|
||||
predefined_type=None,
|
||||
name=None
|
||||
"root.create_entity", self.file, ifc_class="IfcStructuralMember", predefined_type=None, name=None
|
||||
)
|
||||
rel = ifcopenshell.api.run(
|
||||
"structural.assign_structural_analysis_model",
|
||||
|
||||
Reference in New Issue
Block a user