summaryrefslogtreecommitdiff
path: root/tests/test_argparse_custom.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-09 16:37:46 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-09 16:37:46 -0400
commitd815d2cd19a24bac89bd19416fb2b7cd0dadfe03 (patch)
tree2570d13b2561822911b000b36519be742ec89345 /tests/test_argparse_custom.py
parent0d4be64b6ec76fcf5f87933293dbc7c134a32cf0 (diff)
downloadcmd2-git-d815d2cd19a24bac89bd19416fb2b7cd0dadfe03.tar.gz
Initial commit of table creation API
Diffstat (limited to 'tests/test_argparse_custom.py')
-rw-r--r--tests/test_argparse_custom.py10
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