Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-99645: Fix a bug in handling class cleanups in unittest.TestCase#99646
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-99645: Fix a bug in handling class cleanups in unittest.TestCase#99646
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…CaseNow addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.
ronaldoussoren left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Other than the two minor comments mentioned inline the PR looks OK.
| 'end test1','cleanup1']) | ||
| deftest_debug_nested_test(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This test appears to test nothing.
| classInnerTest(unittest.TestCase): | ||
| @classmethod | ||
| defsetUpClass(cls): | ||
| ordering.append('setUpClass2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It might be clearer to change the string to "setup inner" (and likewise for the other numbered strings), that makes it clearer what the expected ordering is.
miss-islington commentedNov 22, 2022
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington commentedNov 22, 2022
Sorry@serhiy-storchaka, I had trouble checking out the |
miss-islington commentedNov 22, 2022
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
miss-islington commentedNov 22, 2022
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
miss-islington commentedNov 22, 2022
Sorry,@serhiy-storchaka, I could not cleanly backport this to |
miss-islington commentedNov 22, 2022
Sorry@serhiy-storchaka, I had trouble checking out the |
…st.TestCase (pythonGH-99646)Now addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.(cherry picked from commitc210213)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…st.TestCase (pythonGH-99646)Now addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.(cherry picked from commitc210213)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
bedevere-bot commentedNov 22, 2022
GH-99698 is a backport of this pull request to the3.11 branch. |
…st.TestCase (pythonGH-99646)Now addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class..(cherry picked from commitc210213)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
bedevere-bot commentedNov 22, 2022
GH-99699 is a backport of this pull request to the3.10 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Now addClassCleanup() uses separate lists for different TestCase subclasses, and doClassCleanups() only cleans up the particular class.