fix map_creep_spread test in python3#55
Merged
StoicLoofah merged 2 commits intoMay 14, 2018
Merged
Conversation
Member
|
GGTracker only cares about the second element of the tuple: |
Collaborator
Author
|
@sklett-src do you have a preference on how I handle this? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the bug here
https://circleci.com/gh/ggtracker/sc2reader/157
The issue is that the value of
max_creep_spreadin this test is(900, 25.22680412371134), and python2 will allow you to compare the tuple and int and call it true, whereas python3 complains.I looked at the code
sc2reader/sc2reader/engine/plugins/creeptracker.py
Lines 80 to 84 in d1b6ede
And there's actually an asymmetry of types here. For zerg,
max_creep_spreadis a tuple (like above), whereas for other races, it is the int 0. My belief is that these should match up, so either zerg should getor terran/protoss should get
I'm not sure which if either is right, though, since I am concerned that ggtracker may depend on specific checks against either of these.
In any case, this hopefully will fix the unit test. If either @dsjoerg or @sklett-src could chime in, that would be helpful. Worst case is that I will just leave a comment int he plugin noting the asymmetry