Message113505
| Author |
denversc |
| Recipients |
benjamin.peterson, bethard, denversc, eric.smith |
| Date |
2010年08月10日.02:53:43 |
| SpamBayes Score |
5.803284e-05 |
| Marked as misclassified |
No |
| Message-id |
<1281408827.47.0.183260667114.issue9554@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|