Message113505
Some of the unit testing code in test_argparse.py could be modified to take advantage of the new unittest features in Python 2.7 and 3.x. My suggested changes are attached in the patch file test_argparse.py.unittest2.patch
One big one is that assertEquals() now prints a "diff" when multi-line strings compare unequal, so the manual "diffing" logic from the unit tests can be removed. Also, assertIsNone() is slightly better than assertEquals(None, x). Finally, there is a tiny fix where parse_args() was expected to throw ArgumentParserError but the test would not fail if it threw no exceptions. |
|
Date |
User |
Action |
Args |
2010-08-10 02:53:47 | denversc | set | recipients:
+ denversc, bethard, eric.smith, benjamin.peterson |
2010-08-10 02:53:47 | denversc | set | messageid: <1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> |
2010-08-10 02:53:45 | denversc | link | issue9554 messages |
2010-08-10 02:53:44 | denversc | create | |
|