mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-26 22:20:56 +00:00
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:
parent
0863e19a3c
commit
4cf477248d
@ -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},
|
||||
)
|
||||
|
@ -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},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user