/tornado/test/runtests.py

https://github.com/marinho/tornado
Python | 56 lines | 39 code | 6 blank | 11 comment | 1 complexity | 17537137beb1aac507cda93f1040bfc0 MD5 | raw file
  1. #!/usr/bin/env python
  2. from __future__ import absolute_import, division, with_statement
  3. import unittest
  4. TEST_MODULES = [
  5. 'tornado.httputil.doctests',
  6. 'tornado.iostream.doctests',
  7. 'tornado.util.doctests',
  8. 'tornado.test.auth_test',
  9. 'tornado.test.curl_httpclient_test',
  10. 'tornado.test.escape_test',
  11. 'tornado.test.gen_test',
  12. 'tornado.test.httpclient_test',
  13. 'tornado.test.httpserver_test',
  14. 'tornado.test.httputil_test',
  15. 'tornado.test.import_test',
  16. 'tornado.test.ioloop_test',
  17. 'tornado.test.iostream_test',
  18. 'tornado.test.locale_test',
  19. 'tornado.test.options_test',
  20. 'tornado.test.process_test',
  21. 'tornado.test.simple_httpclient_test',
  22. 'tornado.test.stack_context_test',
  23. 'tornado.test.template_test',
  24. 'tornado.test.testing_test',
  25. 'tornado.test.twisted_test',
  26. 'tornado.test.util_test',
  27. 'tornado.test.web_test',
  28. 'tornado.test.wsgi_test',
  29. ]
  30. def all():
  31. return unittest.defaultTestLoader.loadTestsFromNames(TEST_MODULES)
  32. if __name__ == '__main__':
  33. # The -W command-line option does not work in a virtualenv with
  34. # python 3 (as of virtualenv 1.7), so configure warnings
  35. # programmatically instead.
  36. import warnings
  37. # Be strict about most warnings. This also turns on warnings that are
  38. # ignored by default, including DeprecationWarnings and
  39. # python 3.2's ResourceWarnings.
  40. warnings.filterwarnings("error")
  41. # setuptools sometimes gives ImportWarnings about things that are on
  42. # sys.path even if they're not being used.
  43. warnings.filterwarnings("ignore", category=ImportWarning)
  44. # Tornado generally shouldn't use anything deprecated, but some of
  45. # our dependencies do (last match wins).
  46. warnings.filterwarnings("ignore", category=DeprecationWarning)
  47. warnings.filterwarnings("error", category=DeprecationWarning,
  48. module=r"tornado\..*")
  49. import tornado.testing
  50. tornado.testing.main()