From: Ben Darnell Date: Sat, 28 May 2011 21:59:49 +0000 (-0700) Subject: Add a test that imports all tornado modules to at least ensure there are no X-Git-Tag: v2.0.0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d4d241a0bf32f15d4cba12b96f71586baf9ccf4;p=thirdparty%2Ftornado.git Add a test that imports all tornado modules to at least ensure there are no syntax errors in otherwise-untested modules like auth and websocket. --- diff --git a/tornado/test/import_test.py b/tornado/test/import_test.py new file mode 100644 index 000000000..b66013264 --- /dev/null +++ b/tornado/test/import_test.py @@ -0,0 +1,29 @@ +import unittest + +class ImportTest(unittest.TestCase): + def test_import_everything(self): + # Some of our modules are not otherwise tested. Import them + # all (unless they have external dependencies) here to at + # least ensure that there are no syntax errors. + import tornado.auth + import tornado.autoreload + # import tornado.curl_httpclient # depends on pycurl + # import tornado.database # depends on MySQLdb + import tornado.escape + import tornado.httpclient + import tornado.httpserver + import tornado.httputil + import tornado.ioloop + import tornado.iostream + import tornado.locale + import tornado.options + import tornado.s3server + import tornado.simple_httpclient + import tornado.stack_context + import tornado.template + import tornado.testing + import tornado.util + import tornado.web + import tornado.websocket + # import tornado.win32_support # depends on windows + import tornado.wsgi diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py index 70e5db255..2fa98e969 100755 --- a/tornado/test/runtests.py +++ b/tornado/test/runtests.py @@ -8,6 +8,7 @@ TEST_MODULES = [ 'tornado.test.escape_test', 'tornado.test.httpserver_test', 'tornado.test.httputil_test', + 'tornado.test.import_test', 'tornado.test.ioloop_test', 'tornado.test.iostream_test', 'tornado.test.simple_httpclient_test',