[Python-checkins] r87952 - in python/branches/py3k/Lib/test: test_abc.py test_descr.py

benjamin.peterson python-checkins at python.org
Wed Jan 12 16:24:27 CET 2011


Author: benjamin.peterson
Date: Wed Jan 12 16:24:27 2011
New Revision: 87952

Log:
move this test to test_descr; it's not abc specific

Modified:
   python/branches/py3k/Lib/test/test_abc.py
   python/branches/py3k/Lib/test/test_descr.py

Modified: python/branches/py3k/Lib/test/test_abc.py
==============================================================================
--- python/branches/py3k/Lib/test/test_abc.py	(original)
+++ python/branches/py3k/Lib/test/test_abc.py	Wed Jan 12 16:24:27 2011
@@ -98,13 +98,6 @@
             self.assertRaises(TypeError, F)  # because bar is abstract now
             self.assertTrue(isabstract(F))
 
-    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__")
-
     def test_metaclass_abc(self):
         # Metaclasses can be ABCs, too.
         class A(metaclass=abc.ABCMeta):

Modified: python/branches/py3k/Lib/test/test_descr.py
==============================================================================
--- python/branches/py3k/Lib/test/test_descr.py	(original)
+++ python/branches/py3k/Lib/test/test_descr.py	Wed Jan 12 16:24:27 2011
@@ -4273,6 +4273,13 @@
         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.


More information about the Python-checkins mailing list