diff options
Diffstat (limited to 'tests_isolated/test_commandset/test_commandset.py')
-rw-r--r-- | tests_isolated/test_commandset/test_commandset.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests_isolated/test_commandset/test_commandset.py b/tests_isolated/test_commandset/test_commandset.py index 7e4e1821..89bac976 100644 --- a/tests_isolated/test_commandset/test_commandset.py +++ b/tests_isolated/test_commandset/test_commandset.py @@ -987,9 +987,10 @@ def test_commandset_settables(): # verify the settable shows up out, err = run_cmd(app, 'set') - assert 'arbitrary_value: 5' in out + any(['arbitrary_value' in line and '5' in line for line in out]) + out, err = run_cmd(app, 'set arbitrary_value') - assert out == ['arbitrary_value: 5'] + any(['arbitrary_value' in line and '5' in line for line in out]) # change the value and verify the value changed out, err = run_cmd(app, 'set arbitrary_value 10') @@ -999,7 +1000,7 @@ now: 10 """ assert out == normalize(expected) out, err = run_cmd(app, 'set arbitrary_value') - assert out == ['arbitrary_value: 10'] + any(['arbitrary_value' in line and '10' in line for line in out]) # can't add to cmd2 now because commandset already has this settable with pytest.raises(KeyError): @@ -1058,9 +1059,10 @@ Parameter 'arbitrary_value' not supported (type 'set' for list of parameters). assert 'some.arbitrary_value' in app.settables.keys() out, err = run_cmd(app, 'set') - assert 'some.arbitrary_value: 5' in out + any(['some.arbitrary_value' in line and '5' in line for line in out]) + out, err = run_cmd(app, 'set some.arbitrary_value') - assert out == ['some.arbitrary_value: 5'] + any(['some.arbitrary_value' in line and '5' in line for line in out]) # verify registering a commandset with duplicate prefix and settable names fails with pytest.raises(CommandSetRegistrationError): |