diff options
Diffstat (limited to 'Lib/test/crashers/weakref_in_del.py')
-rw-r--r-- | Lib/test/crashers/weakref_in_del.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/test/crashers/weakref_in_del.py b/Lib/test/crashers/weakref_in_del.py new file mode 100644 index 0000000..d00937f --- /dev/null +++ b/Lib/test/crashers/weakref_in_del.py @@ -0,0 +1,17 @@ +import weakref + +# http://python.org/sf/1377858 + +ref = None + +def test_weakref_in_del(): + class Target(object): + def __del__(self): + global ref + ref = weakref.ref(self) + + w = Target() + +if __name__ == '__main__': + test_weakref_in_del() + |