[3.12] gh-105431: Remove unused stuff from test_typing.NewTypeTests (GH-105432) (#105489)

gh-105431: Remove unused stuff from `test_typing.NewTypeTests` (GH-105432)
(cherry picked from commit 9d35a71a76)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-06-07 23:57:21 -07:00 committed by GitHub
parent ae25f1c8e5
commit 2b6f475db8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6893,10 +6893,6 @@ class TestModules(TestCase):
class NewTypeTests(BaseTestCase): class NewTypeTests(BaseTestCase):
def cleanup(self):
for f in typing._cleanups:
f()
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
global UserId global UserId
@ -6909,9 +6905,6 @@ class NewTypeTests(BaseTestCase):
del UserId del UserId
del cls.UserName del cls.UserName
def tearDown(self):
self.cleanup()
def test_basic(self): def test_basic(self):
self.assertIsInstance(UserId(5), int) self.assertIsInstance(UserId(5), int)
self.assertIsInstance(self.UserName('Joe'), str) self.assertIsInstance(self.UserName('Joe'), str)