1 --- setup.py.orig 2015-10-28 10:21:14 UTC
3 @@ -7,6 +7,7 @@ import sys
6 from setuptools import setup
7 + from setuptools.command.test import test as TestCommand
9 from distutils.core import setup
11 @@ -48,6 +49,24 @@ def resolve_install_requires():
15 +class PyTest(TestCommand):
16 + user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
18 + def initialize_options(self):
19 + TestCommand.initialize_options(self)
20 + self.pytest_args = []
22 + def finalize_options(self):
23 + TestCommand.finalize_options(self)
25 + self.test_suite = True
27 + def run_tests(self):
28 + #import here, cause outside the eggs aren't loaded
30 + errno = pytest.main(self.pytest_args)
36 @@ -90,5 +109,7 @@ setup(
39 'fast': ['pycohttpparser'],
42 + tests_require=['pytest'],
43 + cmdclass = {'test': PyTest},