mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 11:08:03 +00:00
black, ruff
This commit is contained in:
@@ -263,9 +263,7 @@ class TestImportPsetFromExistingWithAGenericNumericValueAndAnExplicitUnit(NewFil
|
||||
length_mm = ifcopenshell.api.unit.add_si_unit(ifc, unit_type="LENGTHUNIT", prefix="MILLI")
|
||||
|
||||
element = ifc.createIfcWall()
|
||||
prop = ifc.createIfcPropertySingleValue(
|
||||
Name="Foo", NominalValue=ifc.createIfcReal(150.0), Unit=length_mm
|
||||
)
|
||||
prop = ifc.createIfcPropertySingleValue(Name="Foo", NominalValue=ifc.createIfcReal(150.0), Unit=length_mm)
|
||||
metadata = import_single_property(ifc, element, prop)
|
||||
|
||||
assert metadata.special_type == "LENGTH"
|
||||
@@ -291,9 +289,7 @@ class TestImportPsetFromExistingWithAStrayUnitOnANonMeasureProperty(NewFile):
|
||||
length_m = ifcopenshell.api.unit.add_si_unit(ifc, unit_type="LENGTHUNIT")
|
||||
|
||||
element = ifc.createIfcWall()
|
||||
prop = ifc.createIfcPropertySingleValue(
|
||||
Name="Foo", NominalValue=ifc.createIfcLabel("Bar"), Unit=length_m
|
||||
)
|
||||
prop = ifc.createIfcPropertySingleValue(Name="Foo", NominalValue=ifc.createIfcLabel("Bar"), Unit=length_m)
|
||||
metadata = import_single_property(ifc, element, prop) # must not raise
|
||||
|
||||
assert metadata.special_type == ""
|
||||
|
||||
@@ -69,9 +69,7 @@ class TestEditingAnOverriddenUnitPropertyRoundTrips(NewFile):
|
||||
|
||||
element = ifc.createIfcWall()
|
||||
pset = ifcopenshell.api.pset.add_pset(ifc, product=element, name="Pset_Test")
|
||||
prop = ifc.createIfcPropertySingleValue(
|
||||
Name="Foo", NominalValue=ifc.createIfcLengthMeasure(2.5), Unit=length_m
|
||||
)
|
||||
prop = ifc.createIfcPropertySingleValue(Name="Foo", NominalValue=ifc.createIfcLengthMeasure(2.5), Unit=length_m)
|
||||
pset.HasProperties = [prop]
|
||||
|
||||
obj = bpy.data.objects.new("Wall", None)
|
||||
@@ -308,9 +306,7 @@ class TestEditPsetWithUnitOverridePicker(NewFile):
|
||||
|
||||
element = ifc.createIfcWall()
|
||||
pset = ifcopenshell.api.pset.add_pset(ifc, product=element, name="Pset_Test")
|
||||
prop = ifc.createIfcPropertySingleValue(
|
||||
Name="Foo", NominalValue=ifc.createIfcLengthMeasure(2.5), Unit=length_m
|
||||
)
|
||||
prop = ifc.createIfcPropertySingleValue(Name="Foo", NominalValue=ifc.createIfcLengthMeasure(2.5), Unit=length_m)
|
||||
pset.HasProperties = [prop]
|
||||
|
||||
obj = bpy.data.objects.new("Wall", None)
|
||||
|
||||
Reference in New Issue
Block a user