summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-09-30 02:48:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-09-30 02:48:51 (GMT)
commitc44eb73473f31dfde1e8cb6ba485a309e3b0757e (patch)
treec54b284e6a58697779b80b01ff403222c42a6b9d /Lib
parentc2cfa8ddd8dbad8e09b3f3cec56b0727c9370af1 (diff)
parentbbd0a323aeb1222d216fa10a9e1d9c91945ad1e6 (diff)
downloadcpython-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.py6
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