diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-27 13:44:24 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-27 13:44:24 -0400 |
commit | e650fc3defd7ddeb32eeadeeddccda370539ce1d (patch) | |
tree | a4809c8dcdbc3dcf4e1af624ba0e824f0a7c2861 /tests/test_argparse_custom.py | |
parent | 5942f2105eb83140a8ab37e655e2561c4d17d3a2 (diff) | |
parent | e3a07c59b541b4a0b937c62ef38be6d8c011c0a3 (diff) | |
download | cmd2-git-e650fc3defd7ddeb32eeadeeddccda370539ce1d.tar.gz |
Merge branch 'master' into 2.0
Diffstat (limited to 'tests/test_argparse_custom.py')
-rw-r--r-- | tests/test_argparse_custom.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_argparse_custom.py b/tests/test_argparse_custom.py index 8a34edb7..3d41fffd 100644 --- a/tests/test_argparse_custom.py +++ b/tests/test_argparse_custom.py @@ -259,3 +259,13 @@ def test_apcustom_metavar_tuple(): parser = Cmd2ArgumentParser() parser.add_argument('--aflag', nargs=2, metavar=('foo', 'bar'), help='This is a test') assert '[--aflag foo bar]' in parser.format_help() + + +def test_cmd2_attribute_wrapper(): + initial_val = 5 + wrapper = cmd2.Cmd2AttributeWrapper(initial_val) + assert wrapper.get() == initial_val + + new_val = 22 + wrapper.set(new_val) + assert wrapper.get() == new_val |