Classes | |
class | AsyncHTTPTestCase |
class | AsyncTestCase |
class | LogTrapTestCase |
Functions | |
def | get_unused_port |
def | main |
Variables | |
int | _next_port = 10000 |
AsyncHTTPClient = None | |
HTTPServer = None | |
IOLoop = None |
def tornado.testing.get_unused_port | ( | ) |
Returns a (hopefully) unused port number.
Definition at line 46 of file testing.py.
def tornado.testing.main | ( | ) |
A simple test runner. This test runner is essentially equivalent to `unittest.main` from the standard library, but adds support for tornado-style option parsing and log formatting. The easiest way to run a test is via the command line:: python -m tornado.testing tornado.test.stack_context_test See the standard library unittest module for ways in which tests can be specified. Projects with many tests may wish to define a test script like tornado/test/runtests.py. This script should define a method all() which returns a test suite and then call tornado.testing.main(). Note that even when a test script is used, the all() test suite may be overridden by naming a single test on the command line:: # Runs all tests tornado/test/runtests.py # Runs one test tornado/test/runtests.py tornado.test.stack_context_test
Definition at line 323 of file testing.py.
int tornado::testing::_next_port = 10000 |
Definition at line 43 of file testing.py.
Definition at line 31 of file testing.py.
tornado::testing::HTTPServer = None |
Definition at line 32 of file testing.py.
tornado::testing::IOLoop = None |
Definition at line 33 of file testing.py.