2015-11-27 23:25:33 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# Don't run tests from the root repo dir.
|
|
|
|
# We want to ensure we're importing from the installed
|
|
|
|
# binary package not from the CWD.
|
|
|
|
|
|
|
|
import os
|
2018-07-11 07:39:36 +02:00
|
|
|
import sys
|
2015-11-27 23:25:33 +01:00
|
|
|
from subprocess import check_call
|
|
|
|
|
|
|
|
_dname = os.path.dirname
|
|
|
|
|
|
|
|
REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__))))
|
|
|
|
os.chdir(os.path.join(REPO_ROOT, 'tests'))
|
|
|
|
|
2018-07-11 07:39:36 +02:00
|
|
|
args = sys.argv[1:]
|
|
|
|
if not args:
|
|
|
|
args = ['unit/', 'functional/']
|
2015-11-27 23:25:33 +01:00
|
|
|
|
2018-07-11 07:39:36 +02:00
|
|
|
check_call(['nosetests', '--with-coverage', '--cover-erase',
|
|
|
|
'--cover-package', 'boto3', '--with-xunit', '--cover-xml',
|
|
|
|
'-v'] + args)
|