]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98713: Use `@cpython_only` for a test that fails on PyPy (#98714)
authorNikita Sobolev <mail@sobolevn.me>
Wed, 26 Oct 2022 13:15:39 +0000 (16:15 +0300)
committerGitHub <noreply@github.com>
Wed, 26 Oct 2022 13:15:39 +0000 (14:15 +0100)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Lib/test/test_typing.py
Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst [new file with mode: 0644]

index a3f52b8934d0949164f6af90b21aea3be5a29233..9571d9529034cb22f3f99e63c3716bd7a6875aaf 100644 (file)
@@ -42,7 +42,7 @@ import typing
 import weakref
 import types
 
-from test.support import import_helper, captured_stderr
+from test.support import import_helper, captured_stderr, cpython_only
 from test import mod_generics_cache
 from test import _typed_dict_helper
 
@@ -4635,6 +4635,7 @@ class OverloadTests(BaseTestCase):
 
         blah()
 
+    @cpython_only  # gh-98713
     def test_overload_on_compiled_functions(self):
         with patch("typing._overload_registry",
                    defaultdict(lambda: defaultdict(dict))):
diff --git a/Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst b/Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst
new file mode 100644 (file)
index 0000000..57e5894
--- /dev/null
@@ -0,0 +1,3 @@
+Fix a bug in the :mod:`typing` tests where a test relying on CPython-specific
+implementation details was not decorated with ``@cpython_only`` and was not
+skipped on other implementations.