]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add a test that imports all tornado modules to at least ensure there are no
authorBen Darnell <ben@bendarnell.com>
Sat, 28 May 2011 21:59:49 +0000 (14:59 -0700)
committerBen Darnell <ben@bendarnell.com>
Sat, 28 May 2011 21:59:49 +0000 (14:59 -0700)
syntax errors in otherwise-untested modules like auth and websocket.

tornado/test/import_test.py [new file with mode: 0644]
tornado/test/runtests.py

diff --git a/tornado/test/import_test.py b/tornado/test/import_test.py
new file mode 100644 (file)
index 0000000..b660132
--- /dev/null
@@ -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
index 70e5db255a9248115683a3f766c6420c81d56466..2fa98e9692e00a016c287148fc327ca70f411864 100755 (executable)
@@ -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',