Skip to content

Adjust enum reprs conditional from Python 3.10 to 3.11 #8895

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def test_idmaker_enum(self) -> None:
enum = pytest.importorskip("enum")
e = enum.Enum("Foo", "one, two")
result = idmaker(("a", "b"), [pytest.param(e.one, e.two)])
if sys.version_info[:2] >= (3, 10):
if sys.version_info[:2] >= (3, 11):
assert result == ["one-two"]
else:
assert result == ["Foo.one-Foo.two"]
Expand Down
2 changes: 1 addition & 1 deletion testing/test_pytester.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def test_run_result_repr() -> None:

# known exit code
r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5)
if sys.version_info[:2] >= (3, 10):
if sys.version_info[:2] >= (3, 11):
assert repr(r) == (
"<RunResult ret=TESTS_FAILED len(stdout.lines)=3"
" len(stderr.lines)=4 duration=0.50s>"
Expand Down