How to configure setup.py to run tox for the test phase?

How do I configure setup.py to run tox for step test ?

+7
source share
1 answer

Since the http link is dead in the hpk42 link, here is the answer:

You can override the test command to perform toxicity tests instead

 class ToxTest(TestCommand): user_options = [] def initialize_options(self): TestCommand.initialize_options(self) def run_tests(self): import tox tox.cmdline() setuptools.setup( name='package', version=0.1, author='Author', author_email=' author@gmail.com ', description='', license='GPLv3', keywords='', url='', install_requires=['numpy'], packages=[], cmdclass = {'test': ToxTest}, ) 
+1
source

All Articles