Python Library Unittest
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.

unittest.py 728B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. import sys
  5. sys.path.insert(0, 'src')
  6. import optparse
  7. import os
  8. import report
  9. import tests
  10. import unittest
  11. parser = optparse.OptionParser("usage: %prog [clean|run|coverage|pdf|copy|release]")
  12. parser.add_option("-e", "--execution-level", dest="execution_level", default="full", help="sets the execution level [full | short | smoke | single]")
  13. (options, args) = parser.parse_args()
  14. if report.TCEL_REVERSE_NAMED.get(tests.execution_level, report.TCEL_FULL) < report.TCEL_REVERSE_NAMED.get(options.execution_level, report.TCEL_FULL):
  15. options.execution_level = tests.execution_level
  16. unittest.run.unittest(options, args, os.path.abspath(os.path.join(os.path.dirname(__file__))))