Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the deprecated test command from setuptools. #332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
}
)
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down