diff options
author | kotfu <kotfu@kotfu.net> | 2018-01-14 20:54:09 -0700 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-01-14 20:54:09 -0700 |
commit | eac6929c75195dba07da5d183c485918bb6899cf (patch) | |
tree | 0d394abf8e58f6e492dc6fb5558fd1c1dbedf074 /tests/test_argparse.py | |
parent | 22b4f4a6cfd1481c574afb0bababd1aeb6bda3af (diff) | |
download | cmd2-git-eac6929c75195dba07da5d183c485918bb6899cf.tar.gz |
remove use_argument_list attribute
Diffstat (limited to 'tests/test_argparse.py')
-rw-r--r-- | tests/test_argparse.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/test_argparse.py b/tests/test_argparse.py index 3ad1dc97..cfe0ec5c 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -91,34 +91,12 @@ class ArgparseApp(cmd2.Cmd): self.stdout.write('False') -class ArglistApp(cmd2.Cmd): - def __init__(self): - self.use_argument_list = True - cmd2.Cmd.__init__(self) - - def do_arglist(self, arglist): - """Print true if the arglist parameter is passed as a list.""" - if isinstance(arglist, list): - self.stdout.write('True') - else: - self.stdout.write('False') - - @cmd2.with_argument_list - def do_arglistwithdecorator(self, arglist): - self.stdout.write(' '.join(arglist)) - - @pytest.fixture def argparse_app(): app = ArgparseApp() app.stdout = StdOut() return app -@pytest.fixture -def arglist_app(): - app = ArglistApp() - app.stdout = StdOut() - return app def test_argparse_basic_command(argparse_app): out = run_cmd(argparse_app, 'say hello') @@ -178,15 +156,3 @@ def test_arglist_decorator_twice(argparse_app): def test_arglist_and_argparser(argparse_app): out = run_cmd(argparse_app, 'arglistandargparser some "quoted words"') assert out[0] == 'some quoted words' - -def test_use_argument_list(arglist_app): - out = run_cmd(arglist_app, 'arglist "we should" get these in a list, not a string') - assert out[0] == 'True' - -def test_arglist_attribute_and_decorator(arglist_app): - out = run_cmd(arglist_app, 'arglistwithdecorator "we should" get these') - assert out[0] == 'we should get these' - -def test_arglist_help(arglist_app): - out = run_cmd(arglist_app, 'help arglist') - assert out[0] == 'Print true if the arglist parameter is passed as a list.' |