blob: ea29deda07f5108804cbc7d4a094f766f9a718e1 [file] [log] [blame]
Dennis Dmitriev6f59add2016-10-18 13:45:27 +03001#!/usr/bin/env python
2
3import os
4import sys
5
6import pytest
7
8import tcp_tests
9
10
11def shell():
12 if len(sys.argv) > 1:
13 # Run py.test for tcp_tests module folder with specified options
14 testpaths = os.path.dirname(tcp_tests.__file__)
15 opts = ' '.join(sys.argv[1:])
16 addopts = '-vvv -s -p no:django -p no:ipdb --junit-xml=nosetests.xml'
17 return pytest.main('{testpaths} {addopts} {opts}'.format(
18 testpaths=testpaths, addopts=addopts, opts=opts))
19 else:
20 return pytest.main('--help')
21
22
23if __name__ == '__main__':
24 sys.exit(shell())