Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

runtests.py 933B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python
  2. import sys
  3. import logging
  4. from optparse import OptionParser
  5. from tests.config import configure
  6. logging.disable(logging.CRITICAL)
  7. def run_tests(*test_args):
  8. from django_nose import NoseTestSuiteRunner
  9. test_runner = NoseTestSuiteRunner()
  10. if not test_args:
  11. test_args = ['tests']
  12. num_failures = test_runner.run_tests(test_args)
  13. if num_failures:
  14. sys.exit(num_failures)
  15. if __name__ == '__main__':
  16. parser = OptionParser()
  17. __, args = parser.parse_args()
  18. # If no args, then use 'progressive' plugin to keep the screen real estate
  19. # used down to a minimum. Otherwise, use the spec plugin
  20. nose_args = ['-s', '-x',
  21. '--with-progressive' if not args else '--with-spec']
  22. nose_args.extend([
  23. '--with-coverage', '--cover-package=oscar', '--cover-html',
  24. '--cover-html-dir=htmlcov'])
  25. configure(nose_args)
  26. run_tests(*args)