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-71339: Use new assertion methods in test_idle#129213

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
terryjreedy merged 1 commit intopython:mainfromterryjreedy:new_asserts
Jan 23, 2025

Conversation

terryjreedy
Copy link
Member

@terryjreedyterryjreedy commentedJan 23, 2025
edited by bedevere-appbot
Loading

Revise 10 tests in 7 files, with 1 test split into 2.

Revise 10 tests in 7 files, with 1 test split into 2.
@terryjreedy
Copy link
MemberAuthor

@serhiy-storchaka I did not merge in case there is some reason you did not make all these changes. Feel free to merge.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. I propose yet one change:

diff --git a/Lib/idlelib/idle_test/test_run.py b/Lib/idlelib/idle_test/test_run.pyindex 83ecbffa2a1..7366a4b708c 100644--- a/Lib/idlelib/idle_test/test_run.py+++ b/Lib/idlelib/idle_test/test_run.py@@ -426,7 +426,7 @@ def test_exceptions(self):         ex.runcode('1/0')         t, e, tb = ex.user_exc_info         self.assertIs(t, TypeError)-        self.assertTrue(isinstance(e.__context__, ZeroDivisionError))+        self.assertIsInstance(e.__context__, ZeroDivisionError)   if __name__ == '__main__':

@terryjreedy
Copy link
MemberAuthor

I will make a separate PR for old specialized methods. There are at least 20assertEqual(something, None)s that could use 'assertIsNone'. And I found this in test_calltip.py line 334:self.assertIsNone(self.ct.active_calltip, None).

By the 'first one' do you mean the splitting of the condition? It seems that if the conjunction is correct then both separate conditions are correct. The difference is that any error message will be more specific.

serhiy-storchaka reacted with thumbs up emoji

@terryjreedyterryjreedy merged commitdbb25ce intopython:mainJan 23, 2025
51 checks passed
@miss-islington-app
Copy link

Thanks@terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 23, 2025
Revise 10 tests in 7 files, with 1 test split into 2.(cherry picked from commitdbb25ce)Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

GH-129237 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJan 23, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 23, 2025
Revise 10 tests in 7 files, with 1 test split into 2.(cherry picked from commitdbb25ce)Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@bedevere-app
Copy link

GH-129238 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelJan 23, 2025
@terryjreedyterryjreedy deleted the new_asserts branchJanuary 23, 2025 18:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees

@terryjreedyterryjreedy

Labels
skip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@terryjreedy@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp