[Python-checkins] gh-98713: Use `@cpython_only` for a test that fails on PyPy (GH-98714)

miss-islington webhook-mailer at python.org
Wed Oct 26 09:41:48 EDT 2022


https://github.com/python/cpython/commit/ce2b56e280d8c1bfe9385ed2f674bd8da919429c
commit: ce2b56e280d8c1bfe9385ed2f674bd8da919429c
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-26T06:41:42-07:00
summary:

gh-98713: Use `@cpython_only` for a test that fails on PyPy (GH-98714)


Co-authored-by: Alex Waygood <Alex.Waygood at Gmail.com>
(cherry picked from commit 9495360c7256938a6185838561cf416599b7e94f)

Co-authored-by: Nikita Sobolev <mail at sobolevn.me>

files:
A Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst
M Lib/test/test_typing.py

diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 7c48c869ad4f..50fe679c6a31 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -42,7 +42,7 @@
 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
 
@@ -4615,6 +4615,7 @@ def blah():
 
         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
index 000000000000..57e58943df49
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst
@@ -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.



More information about the Python-checkins mailing list