]> granicus.if.org Git - python/commitdiff
Remove outdated tests in test_isinstance (GH-1393)
authorJim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Tue, 2 May 2017 17:17:18 +0000 (20:17 +0300)
committerBrett Cannon <brettcannon@users.noreply.github.com>
Tue, 2 May 2017 17:17:18 +0000 (10:17 -0700)
There is no need to test for new-style classes versus classic classes in Python 3.

Lib/test/test_isinstance.py

index e63d59b346a2acda5935459014dc6f1b382f5e42..65751ab91685503ae4d8b9baf533c06e0c4374b3 100644 (file)
@@ -177,15 +177,6 @@ class Super:
 
 class Child(Super):
     pass
-
-# new-style classes
-class NewSuper(object):
-    pass
-
-class NewChild(NewSuper):
-    pass
-
-
 \f
 class TestIsInstanceIsSubclass(unittest.TestCase):
     # Tests to ensure that isinstance and issubclass work on abstract
@@ -247,15 +238,8 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
         self.assertEqual(False, issubclass(Child, ()))
         self.assertEqual(True, issubclass(Super, (Child, (Super,))))
 
-        self.assertEqual(True, issubclass(NewChild, (NewChild,)))
-        self.assertEqual(True, issubclass(NewChild, (NewSuper,)))
-        self.assertEqual(False, issubclass(NewSuper, (NewChild,)))
-        self.assertEqual(True, issubclass(NewSuper, (NewChild, NewSuper)))
-        self.assertEqual(False, issubclass(NewChild, ()))
-        self.assertEqual(True, issubclass(NewSuper, (NewChild, (NewSuper,))))
-
         self.assertEqual(True, issubclass(int, (int, (float, int))))
-        self.assertEqual(True, issubclass(str, (str, (Child, NewChild, str))))
+        self.assertEqual(True, issubclass(str, (str, (Child, str))))
 
     def test_subclass_recursion_limit(self):
         # make sure that issubclass raises RecursionError before the C stack is