Skip to content

Commit af65aab

Browse files
committed
fixed up 'xor' arg functionality
1 parent 090baa5 commit af65aab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pydra/engine/specs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ def _rule_violations(self) -> list[str]:
511511
)
512512
elif not are_set:
513513
errors.append(
514-
f"At least one of the mutually exclusive fields ({', '.join(field.xor)}) "
515-
f"should be set"
514+
"At least one of the mutually exclusive fields should be set: "
515+
+ ", ".join(f"{n}={v!r}" for n, v in mutually_exclusive.items())
516516
)
517517

518518
# Raise error if any required field is unset.

pydra/engine/tests/test_shelltask_inputspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ def test_task_inputs_mandatory_with_xOR_zero_mandatory_raises_error():
14961496
simple_xor = SimpleXor()
14971497
simple_xor.input_2 = False
14981498
with pytest.raises(
1499-
ValueError, match="At least one of the mutually exclusive fields"
1499+
ValueError, match="At least one of the mutually exclusive fields should be set:"
15001500
):
15011501
simple_xor._check_rules()
15021502

0 commit comments

Comments
 (0)