diff --git a/tests/components_test.py b/tests/components_test.py index 807ccb0e..ad358b08 100644 --- a/tests/components_test.py +++ b/tests/components_test.py @@ -37,6 +37,14 @@ def operate(cls, interface: "Arparma"): assert com1.parse("comp1 --foo 1 --baz 2").matched assert com1.parse("comp1 --foo 2 --baz 1").matched is False + com1.behaviors.clear() + com1.behaviors.append(conflict("foo", "baz.qux", target_limiter=lambda x: x == 1)) + + assert com1.parse("comp1 --foo 1").matched + assert com1.parse("comp1 --baz 2").matched + assert com1.parse("comp1 --foo 1 --baz 2").matched + assert com1.parse("comp1 --foo 1 --baz 1").matched is False + com1_1 = Alconna( "comp1_1", Option("-1", dest="one"),