diff options
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r-- | Lib/test/test_weakref.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index 75869a758a..2754cec5a2 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -271,6 +271,12 @@ class ReferencesTestCase(TestBase): del f[0] self.assertEqual(f.result, 0) + def test_proxy_bool(self): + # Test clearing of SF bug #1170766 + class List(list): pass + lyst = List() + self.assertEqual(bool(weakref.proxy(lyst)), bool(lyst)) + def test_getweakrefcount(self): o = C() ref1 = weakref.ref(o) |