]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
oops, wrong class
authorBenjamin Peterson <benjamin@python.org>
Wed, 12 Jan 2011 15:25:02 +0000 (15:25 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 12 Jan 2011 15:25:02 +0000 (15:25 +0000)
Lib/test/test_descr.py

index 282ec09d930da912de29bf7715b81a79009340da..a81c2183761c040d8a3301867b5c67851a223962 100644 (file)
@@ -4224,6 +4224,13 @@ order (MRO) for bases """
 
         self.assertRaises(AttributeError, getattr, EvilGetattribute(), "attr")
 
+    def test_type_has_no_abstractmethods(self):
+        # type pretends not to have __abstractmethods__.
+        self.assertRaises(AttributeError, getattr, type, "__abstractmethods__")
+        class meta(type):
+            pass
+        self.assertRaises(AttributeError, getattr, meta, "__abstractmethods__")
+
 
 class DictProxyTests(unittest.TestCase):
     def setUp(self):
@@ -4273,13 +4280,6 @@ class DictProxyTests(unittest.TestCase):
         dict_ = {k: v for k, v in self.C.__dict__.items()}
         self.assertEqual(repr(self.C.__dict__), 'dict_proxy({!r})'.format(dict_))
 
-    def test_type_has_no_abstractmethods(self):
-        # type pretends not to have __abstractmethods__.
-        self.assertRaises(AttributeError, getattr, type, "__abstractmethods__")
-        class meta(type):
-            pass
-        self.assertRaises(AttributeError, getattr, meta, "__abstractmethods__")
-
 
 class PTypesLongInitTest(unittest.TestCase):
     # This is in its own TestCase so that it can be run before any other tests.