Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: use strict equality in some tests #2778

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

Ixrec
Copy link
Contributor

@Ixrec Ixrec commented Jan 29, 2024

What is this fixing or adding?

As the title says, make two tests' comparisons strict equality instead of less/greater than or equal.

In particular, test_item_count[_greater]_equal_locations becomes a very useful test for catching simple off-by-N errors once its comparison is made strict. I've already caught multiple bugs in my (unsupported) world with this change. #archipelago-dev believes this test started out with .assertGreaterEqual() only because .assertEqual() would not have passed at the time, but today it does.

How was this tested?

Ran all unittests in PyCharm on my machine on this branch

image

…tests where strict equality seems more correct
@Ixrec Ixrec marked this pull request as ready for review January 29, 2024 12:52
@ScipioWright ScipioWright added the affects: core Issues/PRs that touch core and may need additional validation. label Jan 29, 2024
Copy link
Member

@black-sliver black-sliver left a comment

Choose a reason for hiding this comment

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

Thanks!

@black-sliver black-sliver changed the title Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct Tests: use strict equality in some tests Jan 30, 2024
@black-sliver black-sliver merged commit 144769a into ArchipelagoMW:main Jan 30, 2024
12 checks passed
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
* Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct
TheLX5 pushed a commit to TheLX5/Archipelago that referenced this pull request Mar 2, 2024
* Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct
TheLX5 pushed a commit to TheLX5/Archipelago that referenced this pull request Mar 2, 2024
* Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct
EmilyV99 pushed a commit to EmilyV99/Archipelago that referenced this pull request Apr 15, 2024
* Tests: replace .assertLess/GreaterEqual() with .assertEqual() in two tests where strict equality seems more correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants