Skip to content

Commit

Permalink
Remove PyTest class from setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Feb 19, 2018
1 parent 3b78622 commit 230a623
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
12 changes: 7 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ The generated files will be available in the directory ``build/sphinx/html/``.
.. _Sphinx: http://sphinx-doc.org/

There are no proper tests (yet?), but the code examples from the README file
can be verified by::
can be verified with pytest_.
If you haven't installed it already, you can install it with::

python3 setup.py test
python3 -m pip install pytest ---user

This uses py.test_; if you haven't installed it already, it will be downloaded
and installed for you.
As soon as pytest_ is installed, you can run the (rudimentary) tests with::

.. _py.test: http://pytest.org/
python3 -m pytest

.. _pytest: https://pytest.org/
18 changes: 0 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand


class PyTest(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 pytest
errno = pytest.main(self.test_args)
sys.exit(errno)

__version__ = 'unknown'

Expand Down Expand Up @@ -49,7 +33,5 @@ def run_tests(self):
'Programming Language :: Python :: 3',
'Topic :: Multimedia :: Sound/Audio',
],
tests_require=['pytest'],
cmdclass={'test': PyTest},
zip_safe=True,
)

0 comments on commit 230a623

Please sign in to comment.