-
-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nightly cron ctypes enum failure (#7249)
### Problem Resolves #7247. `ToolchainVariant('gnu')` does not in fact `== 'gnu'`. ### Solution - Use `.resolve_for_enum_variant()` instead of comparing with equality in that one failing test (I missed this in #7226, I fixed the instance earlier in the file though). - Raise an error when trying to use `==` on an enum to avoid this from happening again. - Note that in Python 3 it appears that `__hash__` must be explicitly implemented whenever `__eq__` is overridden, and this appears undocumented. ### Result The nightly cron job should be fixed, and enums are now a little more difficult to screw up. # Open Questions It's a little unclear why this didn't fail in CI -- either the test was cached, or some but not all travis osx images are provisioned with the correct dylib, causing a nondeterministic error, or something else?
- Loading branch information
1 parent
0e6a144
commit 761849e
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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