New submission from Denver Coneybeare <denver.coneybe...@gmail.com>:
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. ---------- components: Tests files: test_argparse.py.unittest2.patch keywords: patch messages: 113505 nosy: benjamin.peterson, bethard, denversc, eric.smith priority: normal severity: normal status: open title: test_argparse.py: use new unittest features type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file18463/test_argparse.py.unittest2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9554> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com