本文整理汇总了Python中setuptools.command.test.test.initialize_options函数的典型用法代码示例。如果您正苦于以下问题:Python initialize_options函数的具体用法?Python initialize_options怎么用?Python initialize_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了initialize_options函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initialize_options
def initialize_options(self):
orig_test.initialize_options(self)
self.verbosity = None
self.failfast = None
self.reverse = None
# self.args is needed because of the above "command_consumes_arguments" class attribute.
self.args = None
示例2: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
try:
from multiprocessing import cpu_count
self.pytest_args = ['-n', str(cpu_count()), '--boxed']
except (ImportError, NotImplementedError):
self.pytest_args = ['-n', '1', '--boxed']
示例3: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
# -rw turns on printing warnings. To see stack trace from
# KeyboardInterrupt, add --fulltrace but it also makes the
# traces huge by showing source code for each frame, so not
# adding it by default.
# To see stdout "live" instead of capturing it, use -s.
coverage_args = ['--cov-config', os.path.join(ROOT, ".coveragerc"), '--cov=conda_kapsel',
'--cov-report=term-missing', '--cov-report=html', '--cov-fail-under=100', '--no-cov-on-fail']
if PY2:
# xdist appears to lock up the test suite with python
# 2, maybe due to an interaction with coverage
enable_xdist = []
else:
# Recent conda downright explodes if run from multiple processes at once,
# so skip xdist until we add our own locking layer or something.
enable_xdist = []
# enable_xdist = ['-n', str(CPU_COUNT)]
self.pytest_args = ['-rfew', '--durations=10'] + enable_xdist
# 100% coverage on Windows requires us to do extra mocks because generally Windows
# can't run all the servers, such as redis-server. So we relax the coverage requirement
# for Windows only.
if platform.system() != 'Windows':
self.pytest_args = self.pytest_args + coverage_args
self.pyfiles = None
self.git_staged_pyfiles = None
self.failed = []
self.format_only = False
self.git_staged_only = False
self.profile_formatting = False
示例4: initialize_options
def initialize_options(self):
test.initialize_options(self)
self.xml_output = None
self.xml_output_file = None
self.coverage_summary = None
self.coverage_dir = None
self.coverage_method = 'trace'
示例5: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.cov_xml = False
self.cov_html = False
self.junitxml = None
self.clearcache = False
示例6: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = [
'--doctest-glob=tests/*.md',
'--cov=delphin',
'--cov-report=html'
]
示例7: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.pytest_args = ['--cov', MAIN_PACKAGE, '--cov-report', 'term-missing',
'--doctest-modules', '-s', '-v',
'--ignore', 'tests/plugins']
self.cov_html = False
示例8: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_default_args = ('--cov-config=.coveragerc '
'--cov=leadrouter '
'--cov-report=term-missing '
'--tb=short ')
self.pytest_args = []
示例9: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = [
'--pep8',
'--flakes',
'--cov=errcron',
]
示例10: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = [
'--doctest-modules',
'--strict',
# '--fulltrace', # useful for debugging
]
示例11: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = [
'Tests',
'--cov=Robinhood/',
'--cov-report=term-missing'
] #load defaults here
示例12: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
logging.basicConfig(format='%(levelname)-10s %(message)s')
logging.getLogger().setLevel(logging.INFO)
# if we have pytest-cache module we enable the test failures first mode
try:
import pytest_cache
self.pytest_args.append("--ff")
except ImportError:
pass
self.pytest_args.append("-s")
if sys.stdout.isatty():
# when run manually we enable fail fast
self.pytest_args.append("--maxfail=1")
try:
import coveralls
self.pytest_args.append("--cov=%s" % NAME)
self.pytest_args.extend(["--cov-report", "term"])
self.pytest_args.extend(["--cov-report", "xml"])
except ImportError:
pass
示例13: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.pytest_args = ['--cov', 'lizzy',
'--cov-report', 'term-missing',
'--cov-report', 'xml',
'-v']
示例14: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None
self.cov_xml = False
self.cov_html = False
self.junitxml = None
self.twisted = False
示例15: initialize_options
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = [
'--cov-config', '.coveragerc',
'--cov-report', 'html',
'--cov=hfut_stu_lib', 'tests/',
'--doctest-modules'
]