Skip to content

Commit f4030a8

Browse files
committed
Remove PyTest command from setup.py
Now that direct execution of setup.py is deprecated, we shouldn't have a custom setuptools command to run tests. Testing the package can be done by running pytest directly, typically from within tox. Accordingly, I'm removing the PyTest command from setup.py in this commit.
1 parent 40c15bf commit f4030a8

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

setup.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from setuptools import Command
21
from setuptools import setup
32

43

@@ -10,23 +9,6 @@ def read(fname):
109
return open(os.path.join(_here, fname)).read()
1110

1211

13-
class PyTest(Command):
14-
user_options = []
15-
16-
def initialize_options(self):
17-
pass
18-
19-
def finalize_options(self):
20-
pass
21-
22-
def run(self):
23-
import subprocess
24-
import sys
25-
26-
errno = subprocess.call([sys.executable, "runtests.py"])
27-
raise SystemExit(errno)
28-
29-
3012
setup(
3113
name="pytest-localserver",
3214
author="Sebastian Rahlf",
@@ -45,7 +27,6 @@ def run(self):
4527
"aiosmtpd",
4628
],
4729
},
48-
cmdclass={"test": PyTest},
4930
tests_require=["pytest>=2.0.0", "requests"],
5031
entry_points={"pytest11": ["localserver = pytest_localserver.plugin"]},
5132
zip_safe=False,

0 commit comments

Comments
 (0)