Skip to content

Commit a06fe99

Browse files
committed
Explain the test
1 parent 579ec62 commit a06fe99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_operator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,12 @@ def test_connection_to_input_is_ambiguous():
586586

587587

588588
def test_connection_to_input_is_not_ambiguous():
589+
# Ensures that connecting an operator with a single output with multiple types all compatible
590+
# does not raise an ambiguity warning.
591+
# Here extract_scoping has only one output of type either Scoping or ScopingsContainer
592+
# This output was reported twice and raised an ambiguity warning despite both types being
593+
# compatible with the input
594+
# This behavior is now fixed and enforced by this test
589595
field = dpf.core.fields_factory.field_from_array(arr=[1.0, 2.0, 3.0])
590596
field.scoping = dpf.core.mesh_scoping_factory.nodal_scoping(node_ids=[1, 2, 3])
591597
scop = dpf.core.operators.utility.extract_scoping(field_or_fields_container=field)

0 commit comments

Comments
 (0)