diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_subcmds.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_subcmds.py b/tests/test_subcmds.py index 2d680fb7..0683f1dd 100644 --- a/tests/test_subcmds.py +++ b/tests/test_subcmds.py | |||
| @@ -94,7 +94,12 @@ class AllCommands(unittest.TestCase): | |||
| 94 | """Block redundant dest= arguments.""" | 94 | """Block redundant dest= arguments.""" |
| 95 | 95 | ||
| 96 | def _check_dest(opt): | 96 | def _check_dest(opt): |
| 97 | if opt.dest is None or not opt._long_opts: | 97 | """Check the dest= setting.""" |
| 98 | # If the destination is not set, nothing to check. | ||
| 99 | # If long options are not set, then there's no implicit destination. | ||
| 100 | # If callback is used, then a destination might be needed because | ||
| 101 | # optparse cannot assume a value is always stored. | ||
| 102 | if opt.dest is None or not opt._long_opts or opt.callback: | ||
| 98 | return | 103 | return |
| 99 | 104 | ||
| 100 | long = opt._long_opts[0] | 105 | long = opt._long_opts[0] |
