replace api.run with static methods

This commit is contained in:
Andrej
2025-06-09 10:59:22 +05:00
parent 02d359d0e6
commit 8b4683aef1
122 changed files with 1334 additions and 1370 deletions
@@ -19,6 +19,7 @@
import pytest
import ifcopenshell.api.alignment
import ifcopenshell.api.context
import ifcopenshell.util.element
def test_add_stationing_to_alignment():
@@ -18,6 +18,8 @@
import test.bootstrap
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.api.root
class TestRemoveContext(test.bootstrap.IFC4):
@@ -22,6 +22,7 @@ import ifcopenshell.api.feature
import ifcopenshell.api.root
import ifcopenshell.api.unit
import ifcopenshell.api.geometry
import ifcopenshell.util.placement
class TestAddFeature(test.bootstrap.IFC4X3):
@@ -20,6 +20,7 @@ import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.util.shape_builder
class TestAddBoolean(test.bootstrap.IFC4):
@@ -20,6 +20,7 @@ import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.util.shape_builder
class TestRemoveBoolean(test.bootstrap.IFC4):
@@ -20,6 +20,7 @@ import test.bootstrap
import ifcopenshell.api.root
import ifcopenshell.api.context
import ifcopenshell.api.geometry
import ifcopenshell.util.shape_builder
class TestValidateType(test.bootstrap.IFC4):
@@ -19,6 +19,7 @@
import time
import test.bootstrap
import ifcopenshell.api.owner
import ifcopenshell.api.owner.settings
class TestUpdateOwnerHistory(test.bootstrap.IFC4):
@@ -33,6 +34,7 @@ class TestUpdateOwnerHistory(test.bootstrap.IFC4):
element = self.file.createIfcWall()
history = ifcopenshell.api.owner.update_owner_history(self.file, element=element)
assert history
assert history.is_a("IfcOwnerHistory")
assert element.OwnerHistory == history
assert history.ChangeAction == "ADDED"
@@ -57,6 +59,7 @@ class TestUpdateOwnerHistory(test.bootstrap.IFC4):
element.OwnerHistory = old_history
new_history = ifcopenshell.api.owner.update_owner_history(self.file, element=element)
assert new_history
assert new_history == old_history
assert element.OwnerHistory == new_history
assert new_history.ChangeAction == "MODIFIED"
@@ -83,6 +86,7 @@ class TestUpdateOwnerHistory(test.bootstrap.IFC4):
element2.OwnerHistory = old_history
new_history = ifcopenshell.api.owner.update_owner_history(self.file, element=element)
assert new_history
assert new_history != old_history
assert element.OwnerHistory == new_history
assert new_history.ChangeAction == "MODIFIED"