-
Notifications
You must be signed in to change notification settings - Fork 693
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: assign the world to WorldTestBase, and a default player field #2385
Conversation
Why not leave |
you still wouldn't get correct typing when accessing options that way unless you added typing to |
…use I like typing self.player far more than random 1's all over the place)
547f3da
to
ee47e8e
Compare
As I said in the initial sdv pr. player=1 is confusing if the player variable is unused (in setup) |
# Conflicts: # test/bases.py
# Conflicts: # test/bases.py
Is there a reason you didn't change AllSealsRequired to use self.world in test_shop_chest.py? |
when i moved my world to the new options api i missed updating the tests to it. the other tests that are changing in this PR are accessing attributes on the world itself, not options. i already addresses all of those in my world rewrite and i'd rather not do it twice and resolve all the conflicts😓 |
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.
lgtm then, not sure if we still want a peer review?
i think at the very least @agilbert1412 wants this if we should |
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.
I do have a significant number of tests that could benefit from this simplified syntax, so I like it.
Code seems good.
…rchipelagoMW#2385) * Tests: assign the World to WorldTestBase and add a player field (because I like typing self.player far more than random 1's all over the place) * more accurate docstring for world and multiworld * use self.player within the class
…rchipelagoMW#2385) * Tests: assign the World to WorldTestBase and add a player field (because I like typing self.player far more than random 1's all over the place) * more accurate docstring for world and multiworld * use self.player within the class
…rchipelagoMW#2385) * Tests: assign the World to WorldTestBase and add a player field (because I like typing self.player far more than random 1's all over the place) * more accurate docstring for world and multiworld * use self.player within the class
…rchipelagoMW#2385) * Tests: assign the World to WorldTestBase and add a player field (because I like typing self.player far more than random 1's all over the place) * more accurate docstring for world and multiworld * use self.player within the class
What is this fixing or adding?
new options API is a nightmare to use from tests atm. Assigns the world to the class after it's created, and sets a player field on the base for usage because I hate typing
1
in method calls. Also some docstrings and very miniscule performance improvementHow was this tested?
how else