Remove obsolete setuptools test integration (#2304)

`make pytest` already runs a superset of all the tests run by `python3
setup-css.py test` and `python3 setup-js.py test`.  (The former didn't
work anyway due to a typo.)

Fixes: #2300, #2301
This commit is contained in:
Colin Watson 2024-07-31 17:29:39 +01:00 committed by GitHub
parent 0863e19a3c
commit 4cf477248d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 52 deletions

View File

@ -1,32 +1,8 @@
#!/usr/bin/env python
import os
import sys
from setuptools import setup
from cssbeautifier.__version__ import __version__
from setuptools.command.test import test as TestCommand
DIR_CSS = "cssbeautifier/tests/"
class PyTestCSS(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ["--assert=plain"] + [
DIR + x for x in os.listdir(DIR) if x.endswith(".py") and x[0] not in "._"
]
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name="cssbeautifier",
@ -45,6 +21,4 @@ setup(
],
install_requires=["jsbeautifier", "six>=1.13.0", "editorconfig>=0.12.2"],
license="MIT",
test_suite="pytest.collector",
cmdclass={"test": PyTestCSS},
)

View File

@ -1,32 +1,8 @@
#!/usr/bin/env python
import os
import sys
from setuptools import setup
from jsbeautifier.__version__ import __version__
from setuptools.command.test import test as TestCommand
DIR = "jsbeautifier/tests/"
class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ["--assert=plain"] + [
DIR + x for x in os.listdir(DIR) if x.endswith(".py") and x[0] not in "._"
]
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name="jsbeautifier",
@ -52,6 +28,4 @@ setup(
],
install_requires=["six>=1.13.0", "editorconfig>=0.12.2"],
license="MIT",
test_suite="pytest.collector",
cmdclass={"test": PyTest},
)