You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_tests.py 598B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. import sys
  3. import os
  4. from optparse import OptionParser
  5. import tests.config
  6. from django.test.simple import DjangoTestSuiteRunner
  7. def run_tests(*test_args):
  8. # Modify path
  9. parent = os.path.dirname(os.path.abspath(__file__))
  10. sys.path.insert(0, parent)
  11. # Run tests
  12. test_runner = DjangoTestSuiteRunner(verbosity=1)
  13. if not test_args:
  14. test_args = ['oscar']
  15. failures = test_runner.run_tests(test_args)
  16. sys.exit(failures)
  17. if __name__ == '__main__':
  18. parser = OptionParser()
  19. (options, args) = parser.parse_args()
  20. run_tests(*args)