diff --git a/setup.py b/setup.py index 7127c77..6c7a49f 100755 --- a/setup.py +++ b/setup.py @@ -3,25 +3,6 @@ import sys from setuptools import setup -from setuptools.command.test import test as TestCommand - - -class PyTestCommand(TestCommand): - user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] - - def initialize_options(self): - TestCommand.initialize_options(self) - self.pytest_args = [] - - def finalize_options(self): - TestCommand.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_tests(self): - import pytest - errno = pytest.main(self.pytest_args) - sys.exit(errno) setup( @@ -59,14 +40,9 @@ def run_tests(self): extras_require={ 'Duration': ['python-dateutil>=2.8.0'] }, - tests_require=['pytest', 'mock==3.0.5'], entry_points={ 'console_scripts': [ 'pyhocon=pyhocon.tool:main' ] }, - test_suite='tests', - cmdclass={ - 'test': PyTestCommand - } ) diff --git a/tox.ini b/tox.ini index 531e4c1..1eb2ac5 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = flake8, py{27,38,39,310,311,312} passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH deps = pytest + mock==3.0.5 coveralls python-dateutil>=2.8.0 # for python 3.4