summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bool.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r--Lib/test/test_bool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py
index 34ecb45..dcdf7bd 100644
--- a/Lib/test/test_bool.py
+++ b/Lib/test/test_bool.py
@@ -383,6 +383,10 @@ class BoolTest(unittest.TestCase):
__bool__ = None
self.assertRaises(TypeError, bool, B())
+ class C:
+ __len__ = None
+ self.assertRaises(TypeError, bool, C())
+
def test_real_and_imag(self):
self.assertEqual(True.real, 1)
self.assertEqual(True.imag, 0)