From 8ba05ef8bcdd53bdd54999cc9885ab310b766d9c Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Thu, 19 Aug 2021 14:45:28 -0400 Subject: set command output now uses SimpleTable. Tabled tab completion now includes divider row. Tab completion results for aliases, macros, and Settables wrap long fields. SimpleTable now accepts blank for the divider character. It is identical to passing None. Removed --verbose flag from set command so the descriptions always show. --- tests_isolated/test_commandset/test_commandset.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests_isolated/test_commandset/test_commandset.py') 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): -- cgit v1.2.1