From 98dd481d9fd9d06d82284385c122c95b7f9dc88b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 12 Jul 2021 16:12:34 +0200
Subject: [PATCH] Revert "Adjust enum reprs for Python 3.10"

This reverts commit 710446420c0bb98f0761724ec865a894820bb610.

The change was reverted in Python 3.10.0b4:

https://mail.python.org/archives/list/python-dev@python.org/message/LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF/
---
 testing/python/metafunc.py |  5 +----
 testing/test_pytester.py   | 14 ++++----------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py
index ce689e56d77..4a4b141c4b7 100644
--- a/testing/python/metafunc.py
+++ b/testing/python/metafunc.py
@@ -448,10 +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):
-            assert result == ["one-two"]
-        else:
-            assert result == ["Foo.one-Foo.two"]
+        assert result == ["Foo.one-Foo.two"]
 
     def test_idmaker_idfn(self) -> None:
         """#351"""
diff --git a/testing/test_pytester.py b/testing/test_pytester.py
index 19f28504d88..7b16c69c23d 100644
--- a/testing/test_pytester.py
+++ b/testing/test_pytester.py
@@ -744,16 +744,10 @@ 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):
-        assert repr(r) == (
-            "<RunResult ret=TESTS_FAILED len(stdout.lines)=3"
-            " len(stderr.lines)=4 duration=0.50s>"
-        )
-    else:
-        assert repr(r) == (
-            "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
-            " len(stderr.lines)=4 duration=0.50s>"
-        )
+    assert (
+        repr(r) == "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
+        " len(stderr.lines)=4 duration=0.50s>"
+    )
 
     # unknown exit code: just the number
     r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)
