[docs] [issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

paul j3 report at bugs.python.org
Sat Oct 3 23:13:17 CEST 2015

paul j3 added the comment:

The unittest file test_argparse.py tests add_argument parameters in 

    class TestInvalidArgumentConstructors(TestCase)

It looks at a dozen different categories of errors, mostly checking that they return the correct TypeError or ValueError.  It does not check the content of error messages.  

If I change the code I described yesterday to return a TypeError again (but with an enhanced message), it passes this unittest.

Most of the test_argparse.py tests just check for error type.  There just a couple of late additions that check error message content:



Python tracker <report at bugs.python.org>

More information about the docs mailing list