How to use the setuptools.command.test.test function in setuptools

To help you get started, we’ve selected a few setuptools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github teozkr / Flask-Pushrod / setup.py View on Github external
from setuptools import setup
from setuptools.command.test import test as TestCommand

from os import path


class PyTest(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import pytest
        raise SystemExit(pytest.main(self.test_args))


setup(
    name='Flask-Pushrod',
    version='0.2.dev',
    url='http://github.com/dontcare4free/flask-pushrod',
    license='MIT',
github christopher-ramirez / secretary / setup.py View on Github external
# -*- coding: utf-8 -*-

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

long_description = """
============
Secretary
============
Take the power of Jinja2 templates to OpenOffice or LibreOffice and create reports and letters in your web applications.

See full `documentation on Github `_
."""

class PyTest(TestCommand):
    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.test_args)
        sys.exit(errno)

setup(
    name='secretary',
    version='0.2.19',
    url='https://github.com/christopher-ramirez/secretary',
    license='MIT',
    author='Christopher Ramírez',
github kengz / SLM-Lab / setup.py View on Github external
'--capture=sys',
    '--log-level=INFO',
    '--log-cli-level=INFO',
    '--log-file-level=INFO',
    '--no-flaky-report',
    '--timeout=300',
    '--cov-report=html',
    '--cov-report=term',
    '--cov-report=xml',
    '--cov=slm_lab',
    '--ignore=test/spec/test_dist_spec.py',
    'test',
]


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

    def initialize_options(self):
        os.environ['PY_ENV'] = 'test'
        TestCommand.initialize_options(self)
        self.pytest_args = test_args

    def run_tests(self):
        import pytest
        errno = pytest.main(self.pytest_args)
        sys.exit(errno)


setup(
    name='slm_lab',
    version='4.0.1',
github NLPatVCU / medaCy / setup.py View on Github external
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from medacy import __version__, __authors__
import sys

packages = find_packages()

def readme():
    with open('README.md') as f:
        return f.read()

class PyTest(TestCommand):
    """
    Custom Test Configuration Class
    Read here for details: https://docs.pytest.org/en/latest/goodpractices.html
    """
    user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = "--cov-config .coveragerc --cov-report html --cov-report term --cov=medacy"

    def run_tests(self):
        import shlex
        # import here, cause outside the eggs aren't loaded
        import pytest

        errno = pytest.main(shlex.split(self.pytest_args))
github datalib / libextract / setup.py View on Github external
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand


class PyTest(TestCommand):
    user_options = []

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = ['-v']

    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)
github hjacobs / aws-saml-login / setup.py View on Github external
def initialize_options(self):
        TestCommand.initialize_options(self)
        self.cov = None
        self.cov_xml = False
        self.cov_html = False
        self.junitxml = None
github sontek / pyramid_webassets / setup.py View on Github external
here = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, 'README.md')) as fp:
    README = fp.read()

with open(os.path.join(here, 'CHANGES.txt')) as fp:
    CHANGES = fp.read()

requires = ['pyramid>=1.4', 'webassets>=0.8', 'zope.interface', 'six>=1.4.1']

extras_require = {
    'bundles-yaml': 'PyYAML>=3.10',
}


class PyTest(TestCommand):
    user_options = [
        ('cov', None, "measure coverage")
    ]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.cov = None

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['pyramid_webassets/tests']
        if self.cov:
            self.test_args += ['--cov', 'pyramid_webassets']
        self.test_suite = True

    def run_tests(self):
github tweekmonster / moult / setup.py View on Github external
try:
    from pypandoc import convert

    def readme_file(readme):
        return convert(readme, 'rst')
except ImportError:
    def readme_file(readme):
        with open(readme, 'r') as fp:
            return fp.read()

moult = __import__('moult')

description = moult.__doc__.strip()


class Tox(TestCommand):
    user_options = [('tox-args=', 'a', "Arguments to pass to tox")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.tox_args = None

    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        import tox
        import shlex

        args = self.tox_args
github NOAA-ORR-ERD / PyGnome / oil_library / setup.py View on Github external
def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True
github achabotl / pambox / setup.py View on Github external
def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = ['--runslow', 'pambox/tests']
        self.test_suite = True