-
Notifications
You must be signed in to change notification settings - Fork 709
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: give seed on default tests and fix execnet error #3520
Conversation
excluded = self.multiworld.worlds[self.player].options.exclude_locations.value | ||
state = self.multiworld.get_all_state(False) | ||
for location in self.multiworld.get_locations(): | ||
if location.name not in excluded: | ||
with self.subTest("Location should be reached", location=location): | ||
with self.subTest("Location should be reached", location=location.name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this keep failing the serialization dumping? i thought we had a proper repr for location, but if we don't i think that's probably the better fix for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the cause of the serialization function failing within tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at it, Location does have a _repr_
that calls _str_
. We could use str(location)
instead, but the end result is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fast tracking this a bit because the reproducability issue is quite pressing.
If there is a better way to do the location serialisation thing, I will be happy to look at another PR for it
…W#3520) * output seed of default tests * test execnet fix * try failing with interpolated string * Update bases.py * try without tryexcept * Update bases.py * Update bases.py * remove fake exception * fix indent * actually fix the execnet issue --------- Co-authored-by: NewSoupVi <[email protected]>
…W#3520) * output seed of default tests * test execnet fix * try failing with interpolated string * Update bases.py * try without tryexcept * Update bases.py * Update bases.py * remove fake exception * fix indent * actually fix the execnet issue --------- Co-authored-by: NewSoupVi <[email protected]>
What is this fixing or adding?
https://github.com/ArchipelagoMW/Archipelago/actions/runs/9488885076/job/26148887892
A test failure that gives effectively no information about the failure.
With these changes, we catch the exception being thrown such that the seed passed intosubTest
will get printed into the logs, allowing for reproduction of the error locally. While this is a stopgap solution, I couldn't find much information about the cause of the error itself.The issue is that we pass
location
intoself.subTest
, when really all we want there islocation.name
. This PR instead fixes this issue alongside providing seed on failing tests.How was this tested?
https://github.com/Silvris/Archipelago/actions/runs/9489978465/job/26152426677https://github.com/Silvris/Archipelago/actions/runs/9533282014/job/26276353017
Manually, by forcefully failing the test within the for loop of all_state_can_reach_everything.
Unittests were also ran locally.