Skip to content

better rect tests using literal values - #3190

Merged
ankith26 merged 8 commits into
pygame-community:mainfrom
Borishkof:rect_test
Jun 7, 2025
Merged

ankith26 merged 8 commits into
pygame-community:mainfrom
Borishkof:rect_test

Conversation

@Amnyzix

@Amnyzix Amnyzix commented Oct 23, 2024

Copy link
Copy Markdown
Contributor

Fix the following functions in rect_test to use literal values for attribute checks : test_inflate__larger, test_inflate__smaller, test_inflate_ip__larger and test_inflate_ip__smaller.

@Amnyzix
Amnyzix requested a review from a team as a code owner October 23, 2024 10:11
@bilhox bilhox linked an issue Oct 23, 2024 that may be closed by this pull request
@bilhox bilhox changed the title fixing rec_test functions on this issue https://github.com/pygame-community/pygame-ce/issues/3096 better rect tests using literal values Oct 23, 2024
@bilhox

bilhox commented Oct 23, 2024

Copy link
Copy Markdown
Contributor

Hi antoine, since you're new to contributing, let me give you one little advice on how you can improve your PRs next time. You don't have to mention the link of the issue in the title, you can mention it in your message directly. With this, you can opt for a more descriptive title for your PR.

@yunline yunline added tests tests (module) Code quality/robustness Code quality and resilience to changes labels Oct 24, 2024
@bilhox

bilhox commented Oct 31, 2024

Copy link
Copy Markdown
Contributor

I think there is a little quiproquo, when I talked about tests for literal values, I meant for rect attributes, not these ones.

@Amnyzix

Amnyzix commented Nov 6, 2024

Copy link
Copy Markdown
Contributor Author

Hello @bilhox, I think I don't really understand what should be done. Could you explain more specifically, maybe ?

Comment thread test/rect_test.py Resolved
@bilhox

bilhox commented Nov 7, 2024

Copy link
Copy Markdown
Contributor

Hello @bilhox, I think I don't really understand what should be done. Could you explain more specifically, maybe ?

What I meant is we should have a test similar to testCalculatedAttributes that check attributes values based on literal values.

Comment thread test/rect_test.py Resolved
Comment thread test/rect_test.py Resolved

@MyreMylar MyreMylar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, LGTM πŸ‘

@ankith26 ankith26 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry for taking this long to get to reviewing your PR. I agree, literal tests do improve the quality of the tests.

Thanks for contributing to pygame-ce! πŸŽ‰

@ankith26 ankith26 added this to the 2.5.6 milestone Jun 7, 2025
@ankith26
ankith26 merged commit 06a0c18 into pygame-community:main Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code quality/robustness Code quality and resilience to changes tests tests (module)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect tests & missing test in rect_test

7 participants