summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2012-07-18 20:17:33 +0200
committerholger krekel <holger@merlinux.eu>2012-07-18 20:17:33 +0200
commit3a69d68a851fcac8655202fb5672280f2a9bab1e (patch)
treebc80fc93dc5f575a4ae16cede55bfc0b15268f90 /setup.py
parentc4108522f838fe458023fc432343dc156e22d975 (diff)
downloadtox-3a69d68a851fcac8655202fb5672280f2a9bab1e.tar.gz
make
python setup.py test run tests via tox itself.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index af74856..4d7da17 100644
--- a/setup.py
+++ b/setup.py
@@ -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()