summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cmd2.py3
-rw-r--r--tests/test_transcript.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 630a8fa0..09c4fa6c 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -1849,6 +1849,9 @@ def test_get_macro_names(base_app):
assert len(base_app.macros) == 2
assert sorted(base_app.get_macro_names()) == ['bar', 'foo']
+def test_get_settable_names(base_app):
+ assert sorted(base_app.get_settable_names()) == sorted(base_app.settable.keys())
+
def test_alias_no_subcommand(base_app, capsys):
out = run_cmd(base_app, 'alias')
assert "Usage: alias [-h]" in out[0]
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index d7438e86..6bfe187e 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -32,10 +32,11 @@ class CmdLineApp(cmd2.Cmd):
self.multiline_commands = ['orate']
self.maxrepeats = 3
- # Add stuff to settable and/or shortcuts before calling base class initializer
+ super().__init__(*args, **kwargs)
+
+ # Make maxrepeats settable at runtime
self.settable['maxrepeats'] = 'Max number of `--repeat`s allowed'
- super().__init__(*args, **kwargs)
self.intro = 'This is an intro banner ...'
speak_parser = argparse.ArgumentParser()