[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional
Changes by Tim Cuthbertson : -- nosy: +gfxmonk ___ Python tracker <http://bugs.python.org/issue15112> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Changes by Tim Cuthbertson : -- nosy: +gfxmonk ___ Python tracker <http://bugs.python.org/issue9334> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5531] unittest: allow failures in tearDown method
New submission from Tim Cuthbertson : This patch adds the behaviour that when a unittest.failureException is thrown in a TestCase's tearDown method, the test case is added to the failures list (instead of the errors list, and only when the test case body has passed successfully). In some circumstances, tests may want to assert that something happens at some point during the body of a test, and the best time to make these checks can be in the tearDown method. This is a modification I've made during development of my mocktest library (https://github.com/gfxmonk/mocktest/tree), and I believe it is beneficial to have as the default unittest behaviour. -- components: Extension Modules files: unittest-fail-on-teardown-0.patch keywords: patch messages: 83927 nosy: gfxmonk severity: normal status: open title: unittest: allow failures in tearDown method versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13387/unittest-fail-on-teardown-0.patch ___ Python tracker <http://bugs.python.org/issue5531> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5531] unittest: allow failures in tearDown method
Tim Cuthbertson added the comment: updated patch: made the test method name unique (oops), and added the specific test case where both test body and tearDown raise failure exceptions. This patch supercedes the original (v0) -- Added file: http://bugs.python.org/file13388/unittest-fail-on-teardown-1.patch ___ Python tracker <http://bugs.python.org/issue5531> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5531] unittest: allow failures in tearDown method
Tim Cuthbertson added the comment: I agree that this is not normally the point of tearDown methods. However, allowing it reduces repetition when you want to verify that some invariant is not violated by any test. I also think that as far as the test writer is concerned, an assertion error is a failed test - regardless of where in the code it came from. -- ___ Python tracker <http://bugs.python.org/issue5531> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5531] unittest: allow failures in tearDown method
Tim Cuthbertson added the comment: In my mind, an error means something is wrong. A failure just means a test case hasn't been implemented yet, or has regressed. For me it's misleading to have an AssertionError reported as a failure. It's not as if changing the reporting in this way could cause tests to succeed when they should fail (or vice versa) - so it seems like there is no downside to including this behaviour. -- ___ Python tracker <http://bugs.python.org/issue5531> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
