mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
black .
This commit is contained in:
@@ -28,12 +28,8 @@ use_step_matcher("parse")
|
||||
@step('There must be exactly {number} "{ifc_class}" elements')
|
||||
def step_impl(context, number, ifc_class):
|
||||
num = len(IfcStore.file.by_type(ifc_class))
|
||||
assert num == int(
|
||||
number
|
||||
), "Could not find {} elements of {}. \
|
||||
Found {} element(s).".format(
|
||||
number, ifc_class, num
|
||||
)
|
||||
assert num == int(number), "Could not find {} elements of {}. \
|
||||
Found {} element(s).".format(number, ifc_class, num)
|
||||
|
||||
|
||||
@given('a set of (key,value) called ("{key_name}","{value_name}")')
|
||||
@@ -95,13 +91,9 @@ def step_impl(context, attribute_name):
|
||||
@then('there must be exactly a number of "{ifc_class}" equals to the number of distinct value')
|
||||
def step_impl(context, ifc_class):
|
||||
try:
|
||||
context.execute_steps(
|
||||
"""
|
||||
context.execute_steps("""
|
||||
then There must be exactly {number} "{ifc_class}" elements
|
||||
""".format(
|
||||
ifc_class=ifc_class, number=context.model.get_count_distinct_values()
|
||||
)
|
||||
)
|
||||
""".format(ifc_class=ifc_class, number=context.model.get_count_distinct_values()))
|
||||
except AssertionError as error:
|
||||
str_error = str(error)
|
||||
assert False, str_error[: str_error.find("Traceback")]
|
||||
|
||||
@@ -51,13 +51,9 @@ def step_impl(context, path_file):
|
||||
@then("there must be exactly a number of {ifc_class} equals to the number of distinct row value")
|
||||
def step_impl(context, ifc_class):
|
||||
try:
|
||||
context.execute_steps(
|
||||
"""
|
||||
context.execute_steps("""
|
||||
then There must be exactly {number} {ifc_class} elements
|
||||
""".format(
|
||||
ifc_class=ifc_class, number=context.model.get_count_distinct_values()
|
||||
)
|
||||
)
|
||||
""".format(ifc_class=ifc_class, number=context.model.get_count_distinct_values()))
|
||||
except AssertionError as error:
|
||||
str_error = str(error)
|
||||
assert False, str_error[: str_error.find("Traceback")]
|
||||
|
||||
Reference in New Issue
Block a user