Skip to content

Commit bd44dd1

Browse files
authored
fix: remove test command and related code from setup.py (#203)
The `test` command and related functions were deprecated for 5 years and it seems the time has come: setuptools maintainers removed it yesterday and that move has broken a bunch of Python packages including this. This commit removes all references to that command and any other code related to that. That means there will be no more `python setup.py test`, but it wasn't be used for a long time. Signed-off-by: Norbert Biczo <[email protected]>
1 parent 32c675d commit bd44dd1

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

setup.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import sys
1818
import pkg_resources
1919
from setuptools import setup, find_packages
20-
from setuptools.command.test import test as TestCommand
2120

2221
__version__ = '3.20.3'
2322

@@ -36,22 +35,6 @@
3635
with open('requirements-dev.txt', encoding='utf-8') as f:
3736
tests_require = [str(req) for req in pkg_resources.parse_requirements(f)]
3837

39-
40-
class PyTest(TestCommand):
41-
"""PyTest class."""
42-
43-
def finalize_options(self):
44-
TestCommand.finalize_options(self)
45-
self.test_args = ['--strict', '--verbose', '--tb=long', 'test']
46-
self.test_suite = True
47-
48-
def run_tests(self):
49-
import pytest
50-
51-
errcode = pytest.main(self.test_args)
52-
sys.exit(errcode)
53-
54-
5538
with open("README.md", "r", encoding='utf-8') as fh:
5639
readme = fh.read()
5740

@@ -62,7 +45,6 @@ def run_tests(self):
6245
license='Apache 2.0',
6346
install_requires=install_requires,
6447
tests_require=tests_require,
65-
cmdclass={'test': PyTest},
6648
author='IBM',
6749
author_email='[email protected]',
6850
long_description=readme,

0 commit comments

Comments
 (0)