-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from wppbav:dev-intenum-no-override
Don't override `IntEnum.__str__` method
- Loading branch information
Showing
4 changed files
with
14 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
# pylint: disable=missing-class-docstring, missing-module-docstring, missing-function-docstring | ||
|
||
import sys | ||
|
||
import pytest | ||
|
||
from bavapi.reference._int_enum import IntEnum | ||
|
||
|
||
@pytest.mark.skipif(sys.version_info >= (3, 11), reason="not needed after python 3.11") | ||
def test_int_enum_str(): | ||
class MockRef(IntEnum): | ||
A = 1 | ||
|
||
assert str(MockRef.A) == "1" | ||
assert MockRef.A.__str__.__name__ == "_int_enum_str" |
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