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

Fix jobs/tests/test_models.py misusingassertTrue#1987

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

Conversation

code-review-doctor
Copy link
Contributor

Fixes#1986

Copy link

@rbanffyrbanffy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@rbanffyrbanffy 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.

Sorry. Not a full-time contributor. At least I had an approve button ;-)

@ambvambv changed the titleSome tests misusing assertTrue for comparisons fixFix jobs/tests/test_models.py misusingassertTrueMar 11, 2024
Copy link
Contributor

@ambvambv left a comment

Choose a reason for hiding this comment

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

This is a valid fix, and a straightforward change.

@hugovk
Copy link
Member

Here's some others, found usinghttps://github.com/isidentical/teyit.

assert_ was removed in 3.12:https://docs.python.org/3/whatsnew/3.12.html#id3

diff --git a/downloads/tests/test_models.py b/downloads/tests/test_models.pyindex f27e951..d31afae 100644--- a/downloads/tests/test_models.py+++ b/downloads/tests/test_models.py@@ -82,8 +82,8 @@ class DownloadModelTests(BaseDownloadTests):          release_38 = Release.objects.create(name='Python 3.8.0')         self.assertFalse(release_38.is_version_at_least_3_9)-        self.assert_(release_38.is_version_at_least_3_5)+        self.assertTrue(release_38.is_version_at_least_3_5)          release_310 = Release.objects.create(name='Python 3.10.0')-        self.assert_(release_310.is_version_at_least_3_9)-        self.assert_(release_310.is_version_at_least_3_5)+        self.assertTrue(release_310.is_version_at_least_3_9)+        self.assertTrue(release_310.is_version_at_least_3_5)

@JacobCoffee
Copy link
Member

@hugovk theseassert_ bits i think will be cleaned up in#2535

hugovk reacted with thumbs up emoji

@JacobCoffee
Copy link
Member

will merge after#2520 settles

@ewdurbinewdurbin merged commit81e2634 intopython:mainSep 13, 2024
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ambvambvambv approved these changes

@rbanffyrbanffyrbanffy approved these changes

@JacobCoffeeJacobCoffeeJacobCoffee approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Some tests misusing assertTrue for comparisons
6 participants
@code-review-doctor@hugovk@JacobCoffee@ambv@rbanffy@ewdurbin

[8]ページ先頭

©2009-2025 Movatter.jp