summaryrefslogtreecommitdiff
path: root/tests/nosewrapper.py
blob: 5837d4300da46c247df2e28c5edbeb16cfbab355 (plain)
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)