summaryrefslogtreecommitdiff
path: root/tests/unit/utils/test_utils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-07-12 16:03:41 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-07-28 14:08:16 +0200
commit1f663fc8a1652b6cb3f9c5947ee368357929446a (patch)
treee22f519c099280d026b1ca0cf302ecb0c925c553 /tests/unit/utils/test_utils.py
parentc36970521fe5ec84f8bdef6cfd0a8bf89bb4fabb (diff)
downloadqutebrowser-1f663fc8a1652b6cb3f9c5947ee368357929446a.tar.gz
qutebrowser-1f663fc8a1652b6cb3f9c5947ee368357929446a.zip
Revert "Fix enum stringification for Python 3.10 a7+"
This reverts commit e2c5fe6262564d9d85806bfa9d4486a411cf5045. See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF (cherry picked from commit 204721836133485efb1acba6d2795193788f9eda)
Diffstat (limited to 'tests/unit/utils/test_utils.py')
-rw-r--r--tests/unit/utils/test_utils.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index 42b95a1a8..57adc883c 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -546,34 +546,6 @@ class TestIsEnum:
assert not utils.is_enum(23)
-class SomeEnum(enum.Enum):
-
- some_value = enum.auto()
-
-
-class TestPyEnumStr:
-
- @pytest.fixture
- def val(self):
- return SomeEnum.some_value
-
- def test_fake_old_python_version(self, monkeypatch, val):
- monkeypatch.setattr(sys, 'version_info', (3, 9, 2))
- assert utils.pyenum_str(val) == str(val)
-
- def test_fake_new_python_version(self, monkeypatch, val):
- monkeypatch.setattr(sys, 'version_info', (3, 10, 0))
- assert utils.pyenum_str(val) == repr(val)
-
- def test_real_result(self, val):
- assert utils.pyenum_str(val) == 'SomeEnum.some_value'
-
- @pytest.mark.skipif(sys.version_info[:2] < (3, 10), reason='Needs Python 3.10+')
- def test_needed(self, val):
- """Fail if this change gets revered before the final 3.10 release."""
- assert str(val) != 'SomeEnum.some_value'
-
-
class TestRaises:
"""Test raises."""