Skip to content

Commit

Permalink
Merge branch 'main' into fix-pypi-pages-long-description
Browse files Browse the repository at this point in the history
  • Loading branch information
drmcodes authored Aug 18, 2024
2 parents ce62092 + 4cf4772 commit e755204
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
23 changes: 0 additions & 23 deletions python/setup-css.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,6 @@
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",
Expand All @@ -46,6 +25,4 @@ def run_tests(self):
],
install_requires=["jsbeautifier", "six>=1.13.0", "editorconfig>=0.12.2"],
license="MIT",
test_suite="pytest.collector",
cmdclass={"test": PyTestCSS},
)
3 changes: 1 addition & 2 deletions python/setup-js.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import sys


from setuptools import setup
from jsbeautifier.__version__ import __version__

Expand Down Expand Up @@ -49,6 +50,4 @@ def run_tests(self):
],
install_requires=["six>=1.13.0", "editorconfig>=0.12.2"],
license="MIT",
test_suite="pytest.collector",
cmdclass={"test": PyTest},
)

0 comments on commit e755204

Please sign in to comment.