Skip to content

Commit ca3c71d

Browse files
wongkathAWSluis-garza-dev
authored andcommitted
fix: replaced deprecated TestCommand with generic Command base class for setuptools 72+ compatibility
1 parent 234d4e2 commit ca3c71d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
import sys
44
import typing
55

6-
from setuptools import find_packages, setup
6+
from setuptools import Command, find_packages, setup
77
from setuptools.command.install import install as InstallCommandBase
8-
from setuptools.command.test import test as TestCommand
98
from setuptools.dist import Distribution
109
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommandBase
1110

1211

13-
class BasePytestCommand(TestCommand):
12+
class BasePytestCommand(Command):
1413
user_options: typing.List = [] # type: ignore
1514

1615
def initialize_options(self):
17-
TestCommand.initialize_options(self)
16+
pass
1817

1918
def finalize_options(self):
20-
TestCommand.finalize_options(self)
21-
self.test_args = []
22-
self.test_suite = True
19+
pass
20+
21+
def run(self):
22+
self.run_tests()
2323

2424
def run_tests(self):
2525
# This method should be overridden by subclasses

0 commit comments

Comments
 (0)