Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedNov 21, 2022
edited by bedevere-bot
Loading

Now addClassCleanup() uses separate lists for different TestCase subclasses, and doClassCleanups() only cleans up the particular class.

…CaseNow addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.
Copy link
Contributor

@ronaldoussorenronaldoussoren left a 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):
Copy link
Contributor

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')
Copy link
Contributor

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.

@serhiy-storchakaserhiy-storchaka merged commitc210213 intopython:mainNov 22, 2022
@serhiy-storchakaserhiy-storchaka deleted the unittest-class-cleanup branchNovember 22, 2022 15:49
@serhiy-storchakaserhiy-storchaka added needs backport to 3.11only security fixes and removed needs backport to 3.11only security fixes labelsNov 22, 2022
@miss-islington
Copy link
Contributor

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington
Copy link
Contributor

Sorry@serhiy-storchaka, I had trouble checking out the3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker c2102136be569e6fc8ed90181f229b46d07142f8 3.11

@serhiy-storchakaserhiy-storchaka added needs backport to 3.10only security fixes needs backport to 3.11only security fixes and removed needs backport to 3.10only security fixes needs backport to 3.11only security fixes labelsNov 22, 2022
@miss-islington
Copy link
Contributor

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@serhiy-storchaka, I could not cleanly backport this to3.10 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker c2102136be569e6fc8ed90181f229b46d07142f8 3.10

@miss-islington
Copy link
Contributor

Sorry@serhiy-storchaka, I had trouble checking out the3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker c2102136be569e6fc8ed90181f229b46d07142f8 3.11

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestNov 22, 2022
…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>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestNov 22, 2022
…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
Copy link

GH-99698 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelNov 22, 2022
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull requestNov 22, 2022
…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
Copy link

GH-99699 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelNov 22, 2022
@serhiy-storchakaserhiy-storchaka removed their assignmentNov 22, 2022
serhiy-storchaka added a commit that referenced this pull requestNov 22, 2022
…tCase (GH-99646) (GH-99698)Now addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.(cherry picked from commitc210213)
serhiy-storchaka added a commit that referenced this pull requestNov 22, 2022
…tCase (GH-99646) (GH-99699)Now addClassCleanup() uses separate lists for different TestCase subclasses,and doClassCleanups() only cleans up the particular class.(cherry picked from commitc210213)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ronaldoussorenronaldoussorenronaldoussoren left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@serhiy-storchaka@miss-islington@bedevere-bot@ronaldoussoren

[8]ページ先頭

©2009-2025 Movatter.jp