]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix unused classes in a typing test (GH-102437)
authorJosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Sun, 5 Mar 2023 15:07:44 +0000 (15:07 +0000)
committerGitHub <noreply@github.com>
Sun, 5 Mar 2023 15:07:44 +0000 (07:07 -0800)
As part of investigation issue https://github.com/python/cpython/issues/102433, I discovered what I believe to be an error where two classes `CI` and `DI` are not being used. The assertions beneath them act on `C` and `D`, duplicating existing assertions in this test.

Automerge-Triggered-By: GH:AlexWaygood
Lib/test/test_typing.py

index 96496ec9279e3f91aea879099aa2a8cbdfdf50bc..2eeaf91d78d8f30f6c8384e84fda570e4c2cbe05 100644 (file)
@@ -2921,8 +2921,8 @@ class ProtocolTests(BaseTestCase):
             def __init__(self):
                 self.x = None
 
-        self.assertIsInstance(C(), P)
-        self.assertIsInstance(D(), P)
+        self.assertIsInstance(CI(), P)
+        self.assertIsInstance(DI(), P)
 
     def test_protocols_in_unions(self):
         class P(Protocol):