From 8b993583391e3426db537066042fe0748f1952c9 Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 13 Feb 2026 13:26:36 +0200 Subject: [PATCH] Update `test_bool.py` from 3.14.3 --- Lib/test/test_bool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index 34ecb45f1..dcdf7bdce 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)