summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-09-30 02:49:05 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-09-30 02:49:05 (GMT)
commit58ee2d31ab2dc039c6929347bf6cfb0cfd827198 (patch)
tree23c45b7a11cc0ffed5e4a8e9f7bc0951d2a1edfc /Lib/test/test_io.py
parente87b7eafe4f7535938584298c7db2cefe864846f (diff)
parentc44eb73473f31dfde1e8cb6ba485a309e3b0757e (diff)
downloadcpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.zip
cpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.tar.gz
cpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.tar.bz2
merge 3.4 (#22517)
Diffstat (limited to 'Lib/test/test_io.py')
-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 e499ba2..a3567fa 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -1628,6 +1628,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