nosewrapper.py 548 B

1234567891011121314151617181920
  1. """ This script simply gets the paths correct for testing eventlet with the
  2. hub extension for Nose."""
  3. import nose
  4. from os.path import dirname, realpath, abspath
  5. import sys
  6. parent_dir = dirname(dirname(realpath(abspath(__file__))))
  7. if parent_dir not in sys.path:
  8. sys.path.insert(0, parent_dir)
  9. # hudson does a better job printing the test results if the exit value is 0
  10. zero_status = '--force-zero-status'
  11. if zero_status in sys.argv:
  12. sys.argv.remove(zero_status)
  13. launch = nose.run
  14. else:
  15. launch = nose.main
  16. launch(argv=sys.argv)