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
concurrent.futures tests don't adher to test_cases protocol #58615
Comments
matt@matt-1005P:~/src/cpython$ ./python -m unittest test.test_concurrent_futures FAILED (errors=18) Failures are due to test discovery picking up unintentionally exposed tests. By adhering to the test_cases protocol introduced in 3.2, this doesn't occur. Patch attached. |
I think the better solution would be to fix the test inheritance hierarchy: only concrete test classes should inherit from unittest.TestCase. Then the code can be simplified by simply calling unittest.main(name). |
New changeset 38243a0a1f44 by Antoine Pitrou in branch '3.3': New changeset 9cc40bc5f02b by Antoine Pitrou in branch 'default': |
Fixed, thanks for reporting! |
I had missed this issue before; bpo-16968 tracks the same thing. There are a couple of issues that the committed patch doesn't address. Namely, the file still uses test_main, and there is no thread or process reaping when running the file via discovery. Unfortunately, there's no clear-cut best solution in the other issue. A couple months ago, Serhiy posted a question on python-dev[1] about how to solve it, which I haven't seen any replies to. Antoine, do you have any suggestions? [1] https://mail.python.org/pipermail/python-dev/2013-August/127893.html |
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: