Code that uses the global IOLoop may retain a global reference to
an AsyncHTTPClient as well, which would become inoperable after a test
had closed it.
def tearDown(self):
self.http_server.stop()
- self.http_client.close()
+ if (not IOLoop.initialized() or
+ self.http_client.io_loop is not IOLoop.instance()):
+ self.http_client.close()
super(AsyncHTTPTestCase, self).tearDown()
* New class `tornado.platform.twisted.TwistedIOLoop` allows Tornado
code to be run on the Twisted reactor (as opposed to the existing
`TornadoReactor`, which bridges the gap in the other direction).
+* `AsyncHTTPTestCase` no longer calls `AsyncHTTPClient.close` for tests
+ that use the singletion `IOLoop.instance`.