Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openfeature/_backports/strenum.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ class StrEnum(str, Enum):
Backport StrEnum for Python <3.11
"""

pass
def __str__(self) -> str:
return str(self.value)
5 changes: 5 additions & 0 deletions tests/test_exception.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from openfeature.exception import ErrorCode


def test_error_code_str():
assert str(ErrorCode.GENERAL) == "GENERAL"
4 changes: 4 additions & 0 deletions tests/test_flag_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ def test_evaluation_details_reason_should_be_a_string_when_set():

# Then
assert Reason.STATIC == flag_details.reason # noqa: SIM300


def test_reason_str():
assert str(Reason.DEFAULT) == "DEFAULT"