@@ -18,6 +18,19 @@ def read(*parts):
1818# LONG_DESCRIPTION = read('README.md')
1919
2020
21+ class Tox (TestCommand ):
22+ def finalize_options (self ):
23+ TestCommand .finalize_options (self )
24+ self .test_args = []
25+ self .test_suite = True
26+
27+ def run_tests (self ):
28+ #import here, cause outside the eggs aren't loaded
29+ import tox
30+ errcode = tox .cmdline (self .test_args )
31+ sys .exit (errcode )
32+
33+
2134class PyTest (TestCommand ):
2235 def finalize_options (self ):
2336 TestCommand .finalize_options (self )
@@ -44,11 +57,13 @@ def run_tests(self):
4457 description = 'A package using public proxies to randomise http requests.' ,
4558 # long_description=LONG_DESCRIPTION,
4659 packages = find_packages (exclude = ['tests' ]),
47- cmdclass = {'test' : PyTest },
48- test_suite = 'tests.test_parsers' ,
4960 include_package_data = True ,
5061 platforms = 'any' ,
51- tests_require = ['pytest' , 'pytest-cov' ],
62+ test_suite = 'tests.test_parsers' ,
63+ tests_require = ['tox' ],
64+ cmdclass = {'test' : Tox },
65+ # tests_require=['pytest', 'pytest-cov'],
66+ # cmdclass={'test': PyTest},
5267 install_requires = ['beautifulsoup4 >= 4.5.3' ,
5368 'httmock>=1.2.6' ,
5469 'psutil>=5.1.3' ,
0 commit comments