File: cgi_runtests.py

package info (click to toggle)
python-tornado 4.4.2-1~bpo8%2B2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 3,020 kB
  • sloc: python: 25,036; sh: 130; xml: 49; ansic: 45; makefile: 45; sql: 26
file content (54 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python
import sys
import unittest

# Most of our tests depend on IOLoop, which is not usable on app engine.
# Run the tests that work, and check that everything else is at least
# importable (via tornado.test.import_test)
TEST_MODULES = [
    'tornado.httputil.doctests',
    'tornado.iostream.doctests',
    'tornado.util.doctests',
    #'tornado.test.auth_test',
    #'tornado.test.concurrent_test',
    #'tornado.test.curl_httpclient_test',
    'tornado.test.escape_test',
    #'tornado.test.gen_test',
    #'tornado.test.httpclient_test',
    #'tornado.test.httpserver_test',
    'tornado.test.httputil_test',
    'tornado.test.import_test',
    #'tornado.test.ioloop_test',
    #'tornado.test.iostream_test',
    'tornado.test.locale_test',
    #'tornado.test.netutil_test',
    #'tornado.test.log_test',
    'tornado.test.options_test',
    #'tornado.test.process_test',
    #'tornado.test.simple_httpclient_test',
    #'tornado.test.stack_context_test',
    'tornado.test.template_test',
    #'tornado.test.testing_test',
    #'tornado.test.twisted_test',
    'tornado.test.util_test',
    #'tornado.test.web_test',
    #'tornado.test.websocket_test',
    #'tornado.test.wsgi_test',
]

def all():
    return unittest.defaultTestLoader.loadTestsFromNames(TEST_MODULES)

def main():
    print "Content-Type: text/plain\r\n\r\n",

    try:
        unittest.main(defaultTest='all', argv=sys.argv[:1])
    except SystemExit, e:
        if e.code == 0:
            print "PASS"
        else:
            raise

if __name__ == '__main__':
    main()