diff options
author | Eric Lin <anselor@gmail.com> | 2020-08-19 14:01:50 -0400 |
---|---|---|
committer | anselor <anselor@gmail.com> | 2021-03-18 18:26:20 -0400 |
commit | 486734e85988d0d0160147b0b44a37759c833e8a (patch) | |
tree | 3b0ef809806d86d781e869771540465cbe089e20 /tests/test_cmd2.py | |
parent | a0cb0e37878a03aa197ba502857afabb0ffad171 (diff) | |
download | cmd2-git-486734e85988d0d0160147b0b44a37759c833e8a.tar.gz |
Each CommandSet's settables are defined separately. cmd2.Cmd searches all registered CommandSets for settables.
Settables can now set any attribute on any object passed to it. The name the user sees may be set to a different value
than what the actual attribute is.
Cmd2 will now aggregate all settables on the cmd2.Cmd instance with each installed CommandSet.
Diffstat (limited to 'tests/test_cmd2.py')
-rwxr-xr-x | tests/test_cmd2.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index b4b13945..cd03e66e 100755 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -176,7 +176,7 @@ Parameter 'qqq' not supported (type 'set' for list of parameters). def test_set_no_settables(base_app): - base_app.settables = {} + base_app._settables.clear() out, err = run_cmd(base_app, 'set quiet True') expected = normalize("There are no settable parameters") assert err == expected @@ -229,11 +229,10 @@ def onchange_app(): def test_set_onchange_hook(onchange_app): out, err = run_cmd(onchange_app, 'set quiet True') - expected = normalize( - """ + expected = normalize(""" +You changed quiet quiet - was: False now: True -You changed quiet """ ) assert out == expected |