From 2aa63d7ef2a97df9478e7a40c74b3e1956bd7bcd Mon Sep 17 00:00:00 2001 From: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Date: Sun, 5 Mar 2023 15:07:44 +0000 Subject: [PATCH] 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 --- Lib/test/test_typing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 7e033c02c40ea7..2be4195b856541 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -1528,8 +1528,8 @@ class DI: 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):