Skip to content

Commit

Permalink
remove setuptools test command
Browse files Browse the repository at this point in the history
  • Loading branch information
branchvincent authored and sethmlarson committed Jul 29, 2024
1 parent 0e322af commit 15e1f17
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from codecs import open

from setuptools import setup
from setuptools.command.test import test as TestCommand

CURRENT_PYTHON = sys.version_info[:2]
REQUIRED_PYTHON = (3, 8)
Expand All @@ -28,30 +27,6 @@
sys.exit(1)


class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass into py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
try:
from multiprocessing import cpu_count

self.pytest_args = ["-n", str(cpu_count()), "--boxed"]
except (ImportError, NotImplementedError):
self.pytest_args = ["-n", "1", "--boxed"]

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.py publish' shortcut.
if sys.argv[-1] == "publish":
os.system("python setup.py sdist bdist_wheel")
Expand Down Expand Up @@ -118,7 +93,6 @@ def run_tests(self):
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries",
],
cmdclass={"test": PyTest},
tests_require=test_requirements,
extras_require={
"security": [],
Expand Down

0 comments on commit 15e1f17

Please sign in to comment.