File: nosewrapper.py

package info (click to toggle)
python-eventlet 0.26.1-7%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,916 kB
  • sloc: python: 24,898; makefile: 98
file content (20 lines) | stat: -rw-r--r-- 548 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
""" This script simply gets the paths correct for testing eventlet with the
hub extension for Nose."""
import nose
from os.path import dirname, realpath, abspath
import sys


parent_dir = dirname(dirname(realpath(abspath(__file__))))
if parent_dir not in sys.path:
    sys.path.insert(0, parent_dir)

# hudson does a better job printing the test results if the exit value is 0
zero_status = '--force-zero-status'
if zero_status in sys.argv:
    sys.argv.remove(zero_status)
    launch = nose.run
else:
    launch = nose.main

launch(argv=sys.argv)