diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-01-12 15:24:27 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-01-12 15:24:27 +0000 |
commit | 1c02a44023f6e6204d8feb944f47edfd56065e5c (patch) | |
tree | c765875bb4742e5b2338ca6dad7c66da8e54883d /Lib/test/test_descr.py | |
parent | 1efb8dc8719aaa2ddef1b4fcd2be1085b63ab140 (diff) | |
download | cpython-git-1c02a44023f6e6204d8feb944f47edfd56065e5c.tar.gz |
move this test to test_descr; it's not abc specific
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 115d1e860a..282ec09d93 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -4273,6 +4273,13 @@ 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. |