diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-09-30 02:48:51 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-09-30 02:48:51 (GMT) |
commit | c44eb73473f31dfde1e8cb6ba485a309e3b0757e (patch) | |
tree | c54b284e6a58697779b80b01ff403222c42a6b9d /Lib | |
parent | c2cfa8ddd8dbad8e09b3f3cec56b0727c9370af1 (diff) | |
parent | bbd0a323aeb1222d216fa10a9e1d9c91945ad1e6 (diff) | |
download | cpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.zip cpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.tar.gz cpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.tar.bz2 |
merge 3.3 (#22517)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_io.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 32e908d..b5506b0 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -1567,6 +1567,12 @@ class BufferedRWPairTest(unittest.TestCase): pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(True)) self.assertTrue(pair.isatty()) + def test_weakref_clearing(self): + brw = self.tp(self.MockRawIO(), self.MockRawIO()) + ref = weakref.ref(brw) + brw = None + ref = None # Shouldn't segfault. + class CBufferedRWPairTest(BufferedRWPairTest): tp = io.BufferedRWPair |