-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail-fast behavior for unittest #52321
Comments
When a long suite of tests is running, it would be nice to be able to exit out early to see the results of the tests that have run so far. I would like to see a couple of features included in If you hit {{{ Traceback (most recent call last):
File "test_test.py", line 39, in test_multiline_equal
self.assertEqual(original, revised)
AssertionError:
- Lorem ipsum dolor sit amet,
? ^
+ Lorem ipsum color sit amet,
? ^
consectetur adipisicing elit,
+ that's the way the cookie crumbles,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ran 7 tests in 12.010s FAILED (failures=1, skipped=1, expected failures=1) A |
fwiw, the similar bpo-2241 was rejected two years ago. |
I like the feature. I'm a bit concerned about the proliferation of command line options for unittest though. Steve's rejection of the feature seemed to be on the basis that he didn't need it (or see a need for it). :-) |
Failfast option added, committed revision 79265. Still needs documentation. Ctrl-C handling not yet done. Slightly more complex as it needs to play well with tests that test SIGINT handling. |
Ctrl-C handling now implemented (-c command line option). Still needs documentation, but there is a bunch of this outstanding and I will do it in one go and rework the unittest docs at the same time. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: