From 170cd3b5f55c42f8f442bac9a72db0ecb4b4a58a Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 7 Oct 2021 18:59:41 +1100 Subject: [PATCH] Minor fix again --- .../test/api/style/test_edit_surface_style.py | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py b/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py index eb090e710d..72064750af 100644 --- a/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py +++ b/src/ifcopenshell-python/test/api/style/test_edit_surface_style.py @@ -11,7 +11,7 @@ class TestEditSurfaceStyle(test.bootstrap.IFC4): "style.edit_surface_style", self.file, style=style, - attributes={"SurfaceColour": [1, 1, 1], "Transparency": 0.5}, + attributes={"SurfaceColour": {"Red": 1, "Green": 1, "Blue": 1}, "Transparency": 0.5}, ) assert style.SurfaceColour == colour assert list(colour) == [None, 1, 1, 1] @@ -26,7 +26,12 @@ class TestEditSurfaceStyle(test.bootstrap.IFC4): "SpecularColour", ]: style = self.file.createIfcSurfaceStyleRendering(self.file.createIfcColourRgb(None, 0, 0, 0)) - ifcopenshell.api.run("style.edit_surface_style", self.file, style=style, attributes={attribute: [1, 1, 1]}) + ifcopenshell.api.run( + "style.edit_surface_style", + self.file, + style=style, + attributes={attribute: {"Red": 1, "Green": 1, "Blue": 1}}, + ) assert list(getattr(style, attribute)) == [None, 1, 1, 1] def test_editing_an_existing_colour_to_another_colour(self): @@ -40,7 +45,12 @@ class TestEditSurfaceStyle(test.bootstrap.IFC4): colour = self.file.createIfcColourRgb(None, 0, 0, 0) style = self.file.createIfcSurfaceStyleRendering(self.file.createIfcColourRgb(None, 0, 0, 0)) setattr(style, attribute, colour) - ifcopenshell.api.run("style.edit_surface_style", self.file, style=style, attributes={attribute: [1, 1, 1]}) + ifcopenshell.api.run( + "style.edit_surface_style", + self.file, + style=style, + attributes={attribute: {"Red": 1, "Green": 1, "Blue": 1}}, + ) assert list(colour) == [None, 1, 1, 1] def test_editing_an_existing_colour_to_a_factor(self): @@ -83,5 +93,10 @@ class TestEditSurfaceStyle(test.bootstrap.IFC4): ]: style = self.file.createIfcSurfaceStyleRendering(self.file.createIfcColourRgb(None, 0, 0, 0)) setattr(style, attribute, self.file.createIfcNormalisedRatioMeasure(0.5)) - ifcopenshell.api.run("style.edit_surface_style", self.file, style=style, attributes={attribute: [1, 1, 1]}) + ifcopenshell.api.run( + "style.edit_surface_style", + self.file, + style=style, + attributes={attribute: {"Red": 1, "Green": 1, "Blue": 1}}, + ) assert list(getattr(style, attribute)) == [None, 1, 1, 1]