summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_isinstance.py
diff options
context:
space:
mode:
authorJim Fasarakis-Hilliard <d.f.hilliard@gmail.com>2017-05-02 17:17:18 (GMT)
committerBrett Cannon <brettcannon@users.noreply.github.com>2017-05-02 17:17:18 (GMT)
commit094909ad69a6654ac43c69ebdced060fbbbbede8 (patch)
treed86df3db3c501b13c10f7165870e62e428523072 /Lib/test/test_isinstance.py
parentf06e0218ef6007667f5d61184b85a81a0466d3ae (diff)
downloadcpython-094909ad69a6654ac43c69ebdced060fbbbbede8.zip
cpython-094909ad69a6654ac43c69ebdced060fbbbbede8.tar.gz
cpython-094909ad69a6654ac43c69ebdced060fbbbbede8.tar.bz2
Remove outdated tests in test_isinstance (GH-1393)
There is no need to test for new-style classes versus classic classes in Python 3.
Diffstat (limited to 'Lib/test/test_isinstance.py')
-rw-r--r--Lib/test/test_isinstance.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py
index e63d59b..65751ab 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