Commit 4d4d3931 authored by Denis Bilenko's avatar Denis Bilenko

test__http.py: 2.4-compatibility

parent 35462e9d
from __future__ import with_statement
from gevent import monkey; monkey.patch_socket()
import gevent
from gevent import http
......@@ -32,8 +31,11 @@ class BoundTestCase(greentest.TestCase):
def tearDown(self):
#self.print_netstat('before stop')
with gevent.Timeout(0.1, False):
timeout = gevent.Timeout.start_new(0.1)
try:
self.http.stop()
finally:
timeout.cancel()
#self.print_netstat('after stop')
self.check_refused()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment