summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_abc.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-30 14:32:41 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-30 14:32:41 (GMT)
commit2e510fb9202977d93cc364e0c661769ea4a8cbbc (patch)
tree7d109639c031eae4f5c177e7ea5371c5e0737fa6 /Lib/test/test_abc.py
parentc8967002353864e012567125d7824abaeeb31dd3 (diff)
downloadcpython-2e510fb9202977d93cc364e0c661769ea4a8cbbc.zip
cpython-2e510fb9202977d93cc364e0c661769ea4a8cbbc.tar.gz
cpython-2e510fb9202977d93cc364e0c661769ea4a8cbbc.tar.bz2
Fix for bug #1109
Warning required when calling register() on an ABCMeta subclass.
Diffstat (limited to 'Lib/test/test_abc.py')
-rw-r--r--Lib/test/test_abc.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_abc.py b/Lib/test/test_abc.py
index e6c8415..a04b271 100644
--- a/Lib/test/test_abc.py
+++ b/Lib/test/test_abc.py
@@ -146,6 +146,13 @@ class TestABC(unittest.TestCase):
C()
self.assertEqual(B.counter, 1)
+ def test_error_on_subclass(self):
+ class A(abc.ABCMeta):
+ pass
+ class B:
+ pass
+ self.assertRaises(TypeError, A.register, B)
+
def test_main():
test_support.run_unittest(TestABC)