Serhiy Storchaka added the comment:
I should agree with you. Then the patch LGTM.
--
assignee: - berker.peksag
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23062
Martin Panter added the comment:
Serhiy, there is already a test for that:
class TestHelpVersionAction(HelpTestCase):
Test the default help for the version action
So I still think the test is redundant, unless it is made to exercise
help=SUPPRESS, as Berker’s patch does.
--
Serhiy Storchaka added the comment:
Why the test class is moved?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23062
___
Berker Peksag added the comment:
Why the test class is moved?
Just wanted to group all TestHelp* tests together.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23062
___
Serhiy Storchaka added the comment:
But it already was between two help tests: TestHelpNoHelpOptional and
TestHelpNone.
I think that original test tested that the help attribute is optional for the
--version argument and default description is printed in help output. This test
shouldn't be
Martin Panter added the comment:
Patch looks sensible enough to me
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23062
___
___
Python-bugs-list
New submission from Martin Panter:
In Lib/test/test_argparse.py:
class TestHelpVersionOptional(HelpTestCase):
Test that the --version argument can be suppressed help messages
Assuming that the docstring means something like “. . . can be suppressed _in_
help messages”, the test is wrong,
Berker Peksag added the comment:
I think that your analysis is correct. Also, looks like the original test is
problematic:
https://code.google.com/p/argparse/source/browse/test/test_argparse.py#3710
Here is a patch to fix the test.
--
keywords: +patch
nosy: +berker.peksag, bethard,