mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
bimtester: steps, improve imports
This commit is contained in:
committed by
Dion Moult
parent
b0097d35b4
commit
6ebb69f62e
@@ -1,5 +1,8 @@
|
||||
from behave import step
|
||||
from utils import IfcFile, assert_attribute, assert_type
|
||||
|
||||
from utils import assert_attribute
|
||||
from utils import assert_type
|
||||
from utils import IfcFile
|
||||
|
||||
|
||||
def get_ifc_class_from_spatial_type(spatial_type):
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
from behave import step
|
||||
from utils import IfcFile, assert_number, assert_pset, assert_attribute
|
||||
import math
|
||||
import ifcopenshell.util
|
||||
import ifcopenshell.util.element
|
||||
import ifcopenshell.util.geolocation
|
||||
from behave import step
|
||||
|
||||
from utils import assert_attribute
|
||||
from utils import assert_number
|
||||
from utils import assert_pset
|
||||
from utils import IfcFile
|
||||
|
||||
|
||||
@step(u"There must be at least one {ifc_class} element")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from behave import step
|
||||
|
||||
from utils import IfcFile
|
||||
from utils import IfcFile, assert_attribute
|
||||
|
||||
|
||||
@step("All elements must be under {number} polygons")
|
||||
@@ -22,7 +22,10 @@ def step_impl(context, number):
|
||||
if total_polygons > number:
|
||||
errors.append((total_polygons, element))
|
||||
if errors:
|
||||
message = "The following {} elements are over 500 polygons:\n".format(len(errors))
|
||||
message = (
|
||||
"The following {} elements are over 500 polygons:\n"
|
||||
.format(len(errors))
|
||||
)
|
||||
for error in errors:
|
||||
message += "Polygons: {} - {}\n".format(error[0], error[1])
|
||||
assert False, message
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import numpy as np
|
||||
import ifcopenshell.util.geolocation
|
||||
import numpy as np
|
||||
from behave import step
|
||||
|
||||
from utils import assert_number
|
||||
from utils import assert_type
|
||||
from utils import IfcFile
|
||||
from utils import IfcFile, assert_number, assert_type
|
||||
|
||||
|
||||
def a2p(o, z, x):
|
||||
|
||||
Reference in New Issue
Block a user