diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-04-23 00:07:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 00:07:29 -0400 |
commit | 86c0df91bddf636178a95838145c46b6c9cc71a8 (patch) | |
tree | 6de53ed49b42e60d4ea0c516b94106086a614981 /tests/test_argparse_custom.py | |
parent | 6bfc6456dce9c2e87c24d0d3ba833323623b63bf (diff) | |
parent | 0ad71461348fa35021eca663eda88b18ab2563cb (diff) | |
download | cmd2-git-86c0df91bddf636178a95838145c46b6c9cc71a8.tar.gz |
Merge pull request #916 from python-cmd2/table_creator
Initial commit of table creation API
Diffstat (limited to 'tests/test_argparse_custom.py')
-rw-r--r-- | tests/test_argparse_custom.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_argparse_custom.py b/tests/test_argparse_custom.py index ce789f8e..92b2ecb4 100644 --- a/tests/test_argparse_custom.py +++ b/tests/test_argparse_custom.py @@ -7,8 +7,8 @@ import argparse import pytest import cmd2 -from cmd2 import Cmd2ArgumentParser -from cmd2.argparse_custom import generate_range_error, INFINITY +from cmd2 import Cmd2ArgumentParser, constants +from cmd2.argparse_custom import generate_range_error from .conftest import run_cmd @@ -188,7 +188,7 @@ def test_apcustom_narg_tuple_other_ranges(): parser = Cmd2ArgumentParser() arg = parser.add_argument('arg', nargs=(2,)) assert arg.nargs == argparse.ONE_OR_MORE - assert arg.nargs_range == (2, INFINITY) + assert arg.nargs_range == (2, constants.INFINITY) # Test finite range parser = Cmd2ArgumentParser() @@ -216,10 +216,10 @@ def test_apcustom_print_message(capsys): def test_generate_range_error(): # max is INFINITY - err_str = generate_range_error(1, INFINITY) + err_str = generate_range_error(1, constants.INFINITY) assert err_str == "expected at least 1 argument" - err_str = generate_range_error(2, INFINITY) + err_str = generate_range_error(2, constants.INFINITY) assert err_str == "expected at least 2 arguments" # min and max are equal |