From 5d51455cf9edfa06d629269274b2f128741300b4 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 26 May 2023 11:02:11 +0100 Subject: [PATCH] Skip a problematic test on CPython 3.12.0b1 (#200) --- CHANGELOG.md | 6 ++++++ src/test_typing_extensions.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6165d9c..18d5f370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# Unreleased + +- Skip a problematic test on Python 3.12.0b1. The test fails on 3.12.0b1 due to + a bug in CPython, which will be fixed in 3.12.0b2. The + `typing_extensions` test suite now passes on 3.12.0b1. + # Release 4.6.2 (May 25, 2023) - Fix use of `@deprecated` on classes with `__new__` but no `__init__`. diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py index fd2a91c3..ac0a2691 100644 --- a/src/test_typing_extensions.py +++ b/src/test_typing_extensions.py @@ -2267,6 +2267,10 @@ class Foo: ... del f.x self.assertNotIsInstance(f, HasX) + @skipIf( + sys.version_info == (3, 12, 0, 'beta', 1), + "CPython had a bug in 3.12.0b1" + ) def test_protocols_isinstance_generic_classes(self): T = TypeVar("T")