From: Jim Fasarakis-Hilliard Date: Tue, 2 May 2017 17:17:18 +0000 (+0300) Subject: Remove outdated tests in test_isinstance (GH-1393) X-Git-Tag: v3.7.0a1~874 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=094909ad69a6654ac43c69ebdced060fbbbbede8;p=python Remove outdated tests in test_isinstance (GH-1393) There is no need to test for new-style classes versus classic classes in Python 3. --- diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py index e63d59b346..65751ab916 100644 --- a/Lib/test/test_isinstance.py +++ b/Lib/test/test_isinstance.py @@ -177,15 +177,6 @@ class Super: class Child(Super): pass - -# new-style classes -class NewSuper(object): - pass - -class NewChild(NewSuper): - pass - - 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