From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 5 Mar 2023 15:31:42 +0000 (-0800) Subject: Fix unused classes in a typing test (GH-102437) X-Git-Tag: v3.11.3~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c957128b480445079b462b23b5ba3162c032f098;p=thirdparty%2FPython%2Fcpython.git Fix unused classes in a typing test (GH-102437) 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. (cherry picked from commit 7894bbe94ba319eb650f383cb5196424c77b2cfd) Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Automerge-Triggered-By: GH:AlexWaygood --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 276f95bacfcf..4fe17a655dfd 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -2916,8 +2916,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):