Back to working version

Better to have 10 important check, than only one for style
This commit is contained in:
Jorengarenar 2020-01-15 05:58:18 +01:00
parent ed0d2bb0bb
commit fb6f388f12
4 changed files with 38 additions and 26 deletions

View File

@ -1 +0,0 @@
# Empty file :)

View File

@ -6,10 +6,26 @@ import sys
from setuptools import setup
from jsbeautifier.__version__ import __version__
import testcommand
from testcommand import PyTest, DIR
from setuptools.command.test import test as TestCommand
DIR = 'cssbeautifier/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)
testcommand.DIR = 'cssbeautifier/tests/'
setup(name='cssbeautifier',
version=__version__,

View File

@ -6,10 +6,26 @@ import sys
from setuptools import setup
from jsbeautifier.__version__ import __version__
import testcommand
from testcommand import PyTest
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)
testcommand.DIR = 'jsbeautifier/tests/'
setup(name='jsbeautifier',
version=__version__,

View File

@ -1,19 +0,0 @@
from setuptools.command.test import test as TestCommand
DIR = ''
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)