mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-02 01:46:27 +00:00
Fixing tests after 2dc9dc200
This commit is contained in:
@@ -85,22 +85,39 @@ class TestUpdateStyleColours:
|
||||
def test_updating_rendering_style_if_available(self, ifc, style):
|
||||
style.get_style("obj").should_be_called().will_return("element")
|
||||
style.can_support_rendering_style("obj").should_be_called().will_return(True)
|
||||
style.get_surface_rendering_style("obj").should_be_called().will_return("style")
|
||||
style.get_surface_rendering_attributes("obj").should_be_called().will_return("attributes")
|
||||
ifc.run("style.edit_surface_style", style="style", attributes="attributes").should_be_called()
|
||||
|
||||
style.get_surface_rendering_style("obj").should_be_called().will_return("rendering_style")
|
||||
style.get_texture_style("obj").should_be_called().will_return("texture_style")
|
||||
style.get_surface_rendering_attributes("obj", "verbose").should_be_called().will_return("attributes")
|
||||
ifc.run("style.edit_surface_style", style="rendering_style", attributes="attributes").should_be_called()
|
||||
|
||||
ifc.run("style.add_surface_textures", material="obj").should_be_called().will_return("textures")
|
||||
ifc.run("style.edit_surface_style", style="texture_style", attributes={"Textures": "textures"}).should_be_called().will_return("textures")
|
||||
|
||||
style.record_shading("obj").should_be_called()
|
||||
subject.update_style_colours(ifc, style, obj="obj")
|
||||
subject.update_style_colours(ifc, style, obj="obj", verbose="verbose")
|
||||
|
||||
def test_adding_a_rendering_style_if_not_available(self, ifc, style):
|
||||
style.get_style("obj").should_be_called().will_return("element")
|
||||
style.can_support_rendering_style("obj").should_be_called().will_return(True)
|
||||
|
||||
style.get_surface_rendering_style("obj").should_be_called().will_return(None)
|
||||
style.get_surface_rendering_attributes("obj").should_be_called().will_return("attributes")
|
||||
style.get_texture_style("obj").should_be_called().will_return(None)
|
||||
style.get_surface_rendering_attributes("obj", "verbose").should_be_called().will_return("attributes")
|
||||
ifc.run(
|
||||
"style.add_surface_style", style="element", ifc_class="IfcSurfaceStyleRendering", attributes="attributes"
|
||||
).should_be_called()
|
||||
|
||||
ifc.run("style.add_surface_textures", material="obj").should_be_called().will_return("textures")
|
||||
ifc.run(
|
||||
"style.add_surface_style",
|
||||
style="element",
|
||||
ifc_class="IfcSurfaceStyleWithTextures",
|
||||
attributes={"Textures": "textures"},
|
||||
).should_be_called()
|
||||
|
||||
style.record_shading("obj").should_be_called()
|
||||
subject.update_style_colours(ifc, style, obj="obj")
|
||||
subject.update_style_colours(ifc, style, obj="obj", verbose="verbose")
|
||||
|
||||
def test_updating_shading_style_as_a_fallback_if_available(self, ifc, style):
|
||||
style.get_style("obj").should_be_called().will_return("element")
|
||||
|
||||
Reference in New Issue
Block a user