From 22a53fdb20b56c147a1326a5eaa2399694ad01aa Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 26 Oct 2022 14:49:59 +0300 Subject: [PATCH 1/3] gh-98713: Use `@cpython_only` for a test that fails on PyPy --- Lib/test/test_typing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index a3f52b8934d094..9571d9529034cb 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 @@ -4635,6 +4635,7 @@ def blah(): blah() + @cpython_only # gh-98713 def test_overload_on_compiled_functions(self): with patch("typing._overload_registry", defaultdict(lambda: defaultdict(dict))): From 8383bc25d1284e0830684d3bee290840ba05007f Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 26 Oct 2022 15:19:47 +0300 Subject: [PATCH 2/3] Add news entry --- .../next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst 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 00000000000000..51bd7c1bd0b218 --- /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 test suite when cpython-specific implementation details were +not covered by ``@cpython_only`` and were not skipped on other +implementations. From 909a888bc8b016b70e741ef4e1ba535387b8ba3e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 26 Oct 2022 15:45:04 +0300 Subject: [PATCH 3/3] Update Misc/NEWS.d/next/Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst Co-authored-by: Alex Waygood --- .../Tests/2022-10-26-15-19-20.gh-issue-98713.Lnu32R.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 index 51bd7c1bd0b218..57e58943df4907 100644 --- 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 @@ -1,3 +1,3 @@ -Fix a bug in test suite when cpython-specific implementation details were -not covered by ``@cpython_only`` and were not skipped on other -implementations. +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.