Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r88238:60632ceee47b
Date: 2016-11-08 19:49 +0000
http://bitbucket.org/pypy/pypy/changeset/60632ceee47b/
Log: Make sure that the response gets closed, to prevent deadlock
diff --git a/lib-python/3/test/test_httpservers.py
b/lib-python/3/test/test_httpservers.py
--- a/lib-python/3/test/test_httpservers.py
+++ b/lib-python/3/test/test_httpservers.py
@@ -254,7 +254,8 @@
with support.captured_stderr() as err:
self.con.request('GET', '/')
- self.con.getresponse()
+ with self.con.getresponse():
+ pass
self.assertTrue(
err.getvalue().endswith('"GET / HTTP/1.1" 200 -\n'))
@@ -265,7 +266,8 @@
with support.captured_stderr() as err:
self.con.request('ERROR', '/')
- self.con.getresponse()
+ with self.con.getresponse():
+ pass
lines = err.getvalue().split('\n')
self.assertTrue(lines[0].endswith('code 404, message File not found'))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit