diff options
author | holger krekel <holger@merlinux.eu> | 2012-07-18 20:17:33 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2012-07-18 20:17:33 +0200 |
commit | 3a69d68a851fcac8655202fb5672280f2a9bab1e (patch) | |
tree | bc80fc93dc5f575a4ae16cede55bfc0b15268f90 /setup.py | |
parent | c4108522f838fe458023fc432343dc156e22d975 (diff) | |
download | tox-3a69d68a851fcac8655202fb5672280f2a9bab1e.tar.gz |
make
python setup.py test
run tests via tox itself.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,5 +1,6 @@ import sys from setuptools import setup +from setuptools.command.test import test as TestCommand long_description=""" What is Tox? @@ -25,6 +26,15 @@ For more information, docs and many examples please checkout the `home page`_: .. _`home page`: http://tox.testrun.org/ """ +class Tox(TestCommand): + def finalize_options(self): + TestCommand.finalize_options(self) + self.test_args = [] + self.test_suite = True + def run_tests(self): + #import here, cause outside the eggs aren't loaded + import tox + tox.cmdline(self.test_args) def main(): version = sys.version_info[:2] @@ -43,6 +53,10 @@ def main(): author_email='holger@merlinux.eu', packages=['tox', ], entry_points={'console_scripts': 'tox=tox:cmdline'}, + # we use a public tox version to test, see tox.ini's testenv + # "deps" definition for the required dependencies + tests_require=['tox'], + cmdclass={"test": Tox}, install_requires=install_requires, zip_safe=True, classifiers=[ @@ -60,4 +74,4 @@ def main(): ) if __name__ == '__main__': - main()
\ No newline at end of file + main() |