mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 12:56:26 +00:00
You can now show and hide distribution ports of an element.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
# We always call the module we're testing the "test subject". This makes our
|
||||
# tests simple to read: just look for where the "subject" is called!
|
||||
import blenderbim.core.demo as subject
|
||||
|
||||
# These are like mocks, stubs, or spy objects. They don't do anything, but they
|
||||
# let us check our test expectations.
|
||||
from test.core.bootstrap import ifc, demo
|
||||
|
||||
@@ -88,3 +88,18 @@ class TestSelectSystemProducts:
|
||||
def test_run(self, system):
|
||||
system.select_system_products("system").should_be_called()
|
||||
subject.select_system_products(system, system="system")
|
||||
|
||||
|
||||
class TestShowPorts:
|
||||
def test_run(self, system):
|
||||
system.get_ports("element").should_be_called().will_return(["port"])
|
||||
system.load_ports(["port"]).should_be_called()
|
||||
system.select_elements(["port"]).should_be_called()
|
||||
subject.show_ports(system, element="element")
|
||||
|
||||
|
||||
class TestHidePorts:
|
||||
def test_run(self, system):
|
||||
system.get_ports("element").should_be_called().will_return(["port"])
|
||||
system.delete_element_objects(["port"]).should_be_called()
|
||||
subject.hide_ports(system, element="element")
|
||||
|
||||
Reference in New Issue
Block a user