Skip to content

Commit 321a52d

Browse files
[core] attributes: Add tests for coverage
1 parent 5778960 commit 321a52d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def test_attribute_retrieve_linked_input_and_output_attributes():
1717
n3 = g.addNewNode('AppendFiles', input=n1.output, input2=n2.output)
1818

1919
# check that the attribute can retrieve its linked input attributes
20+
21+
assert n0.output.hasOutputConnections
22+
assert not n3.output.hasOutputConnections
23+
2024
assert len(n0.input.getLinkedInAttributes()) == 0
2125
assert len(n1.input.getLinkedInAttributes()) == 1
2226
assert n1.input.getLinkedInAttributes()[0] == n0.output
@@ -26,4 +30,10 @@ def test_attribute_retrieve_linked_input_and_output_attributes():
2630
assert n1.output.getLinkedOutAttributes()[0] == n2.input
2731
assert n1.output.getLinkedOutAttributes()[1] == n3.input
2832

33+
n0.graph = None
34+
35+
# Bounding cases
36+
assert not n0.output.hasOutputConnections
37+
assert len(n0.input.getLinkedInAttributes()) == 0
38+
assert len(n0.output.getLinkedOutAttributes()) == 0
2939

0 commit comments

Comments
 (0)