fuel-ccp-tests/fuel_ccp_tests/run_test.py

25 lines
604 B
Python

#!/usr/bin/env python
import os
import sys
import pytest
import fuel_ccp_tests
def shell():
if len(sys.argv) > 1:
# Run py.test for fuel_ccp_tests module folder with specified options
testpaths = os.path.dirname(fuel_ccp_tests.__file__)
opts = ' '.join(sys.argv[1:])
addopts = '-vvv -s -p no:django -p no:ipdb --junit-xml=nosetests.xml'
return pytest.main('{testpaths} {addopts} {opts}'.format(
testpaths=testpaths, addopts=addopts, opts=opts))
else:
return pytest.main('--help')
if __name__ == '__main__':
sys.exit(shell())