Use py.test for setup.py test command

This commit is contained in:
Roman Zeyde
2014-09-03 10:10:33 +03:00
parent a2a527c1d1
commit 5298be14fb

View File

@@ -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=[