diff options
author | kmvanbrunt <kmvanbrunt@gmail.com> | 2018-10-11 14:07:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 14:07:50 -0400 |
commit | 473cb08237b402658e857d786d5294defe721ec7 (patch) | |
tree | 322051b16a75531aa8015c494b3f17c5caafee60 /tests/test_completion.py | |
parent | f38e100fd77f4a136a4883d23b2f4f8b3cd934b7 (diff) | |
parent | 8bed2448ede91fc5cb7d8ff1044a75650350810e (diff) | |
download | cmd2-git-473cb08237b402658e857d786d5294defe721ec7.tar.gz |
Merge pull request #573 from python-cmd2/double_dash
Double dash
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index ed36eb01..0df06423 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -716,31 +716,6 @@ def test_add_opening_quote_delimited_space_in_prefix(cmd2_app): os.path.commonprefix(cmd2_app.completion_matches) == expected_common_prefix and \ cmd2_app.display_matches == expected_display -def test_argparse_remainder_completion(cmd2_app): - # First test a positional with nargs=argparse.REMAINDER - text = '--h' - line = 'help command subcommand {}'.format(text) - endidx = len(line) - begidx = endidx - len(text) - - # --h should not complete into --help because we are in the argparse.REMAINDER sections - assert complete_tester(text, line, begidx, endidx, cmd2_app) is None - - # Now test a flag with nargs=argparse.REMAINDER - parser = argparse.ArgumentParser() - parser.add_argument('-f', nargs=argparse.REMAINDER) - - # Overwrite eof's parser for this test - cmd2.Cmd.do_eof.argparser = parser - - text = '--h' - line = 'eof -f {}'.format(text) - endidx = len(line) - begidx = endidx - len(text) - - # --h should not complete into --help because we are in the argparse.REMAINDER sections - assert complete_tester(text, line, begidx, endidx, cmd2_app) is None - @pytest.fixture def sc_app(): c = SubcommandsExample() |