diff --git a/setup.py b/setup.py index 54c745e..e9881d0 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python import os +import sys try: from setuptools import setup @@ -8,6 +9,16 @@ except ImportError: pwd = os.path.dirname(__file__) +from setuptools.command.test import test as TestCommand + +class PyTest(TestCommand): + def finalize_options(self): + self.test_args = [] + self.test_suite = True + def run_tests(self): + import pytest + sys.exit(pytest.main(['tests'])) + setup( name="amodem", version="1.1", @@ -17,8 +28,8 @@ setup( license="MIT", url="http://github.com/romanz/amodem", packages=['amodem'], - tests_require=['nose'], - test_suite='nose.collector', + tests_require=['pytest'], + cmdclass = {'test': PyTest}, install_requires=['numpy', 'bitarray', 'reedsolo'], platforms=['POSIX'], classifiers=[