Arguments passed to self.stop are returned from The IOLoop’s start and stop methods should not beĬalled directly. Global IOLoop, subclasses should override get_new_ioloop to return it. Must call self.wait(), and asynchronous callbacks should callīy default, a new IOLoop is constructed for each test and is availableĪs self.io_loop. Methods for a more manual style of testing. This class also provides the (deprecated) stop() and wait() To write your tests with coroutines,ĭecorate your test methods with _test instead This means thatĪsynchronous code cannot be used in quite the same way as usualĪnd must be adapted to fit. The unittest framework is synchronous, so the test must beĬomplete by the time the test method returns. TestCase subclass for testing IOLoop-based AsyncTestCase ( methodName : str = 'runTest' ) ¶ Main(): A simple test runner (wrapper around unittest.main()) with supportįor the toreload module to rerun the tests when code changes.Īsynchronous test cases ¶ class tornado.testing. With additional support for testing asynchronous ( IOLoop-based) code. Tornado.testing - Unit testing support for asynchronous code ¶ĪsyncTestCase and AsyncHTTPTestCase: Subclasses of unittest.TestCase
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |