本文整理汇总了Python中setup.print_failure_message函数的典型用法代码示例。如果您正苦于以下问题:Python print_failure_message函数的具体用法?Python print_failure_message怎么用?Python print_failure_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_failure_message函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: print_failed
def print_failed():
# generated on http://patorjk.com/software/taag/#p=display&f=Small&t=FAILED
print_failure_message(r''' ___ _ ___ _ ___ ___
| __/_\ |_ _| | | __| \
| _/ _ \ | || |__| _|| |) |
|_/_/ \_\___|____|___|___/
''')
开发者ID:konstantinos-papadopoulos,项目名称:PID-BO-CONTROLLER,代码行数:7,代码来源:pavement.py
示例2: coverage
def coverage():
"""Run tests and show test coverage report."""
try:
import pytest_cov # NOQA
except ImportError:
print_failure_message("Install the pytest coverage plugin to use this task, " "i.e., `pip install pytest-cov'.")
raise SystemExit(1)
import pytest
pytest.main(PYTEST_FLAGS + ["--cov", CODE_DIRECTORY, "--cov-report", "term-missing", TESTS_DIRECTORY])
开发者ID:agriff86,项目名称:rd-deconvolve,代码行数:10,代码来源:pavement.py
示例3: on_modified
def on_modified(self, event):
print_failure_message('Modification detected. Rebuilding docs.')
# # Strip off the path prefix.
# import os
# if event.src_path[len(os.getcwd()) + 1:].startswith(
# CODE_DIRECTORY):
# # sphinx-build doesn't always pick up changes on code files,
# # even though they are used to generate the documentation. As
# # a workaround, just clean before building.
doc_html()
print_success_message('Docs have been rebuilt.')
开发者ID:konstantinos-papadopoulos,项目名称:PID-BO-CONTROLLER,代码行数:11,代码来源:pavement.py
示例4: doc_open
def doc_open():
"""Build the HTML docs and open them in a web browser."""
doc_index = os.path.join(DOCS_DIRECTORY, "build", "html", "index.html")
if sys.platform == "darwin":
# Mac OS X
subprocess.check_call(["open", doc_index])
elif sys.platform == "win32":
# Windows
subprocess.check_call(["start", doc_index], shell=True)
elif sys.platform == "linux2":
# All freedesktop-compatible desktops
subprocess.check_call(["xdg-open", doc_index])
else:
print_failure_message("Unsupported platform. Please open `{0}' manually.".format(doc_index))
开发者ID:agriff86,项目名称:rd-deconvolve,代码行数:14,代码来源:pavement.py
示例5: coverage
def coverage():
"""Run tests and show test coverage report."""
try:
import pytest_cov # NOQA
except ImportError:
print_failure_message(
'Install the pytest coverage plugin to use this task, '
"i.e., `pip install pytest-cov'.")
raise SystemExit(1)
import pytest
pytest.main(PYTEST_FLAGS + [
'--cov', CODE_DIRECTORY,
'--cov-report', 'term-missing',
'--junit-xml', 'test-report.xml',
TESTS_DIRECTORY])
开发者ID:abalkin,项目名称:tz,代码行数:15,代码来源:pavement.py
示例6: doc_open
def doc_open():
"""Build the HTML docs and open them in a web browser."""
doc_index = os.path.join(DOCS_DIRECTORY, 'build', 'html', 'index.html')
if sys.platform == 'darwin':
# Mac OS X
subprocess.check_call(['open', doc_index])
elif sys.platform == 'win32':
# Windows
subprocess.check_call(['start', doc_index], shell=True)
elif sys.platform == 'linux2':
# All freedesktop-compatible desktops
subprocess.check_call(['xdg-open', doc_index])
else:
print_failure_message(
"Unsupported platform. Please open `{0}' manually.".format(
doc_index))
开发者ID:konstantinos-papadopoulos,项目名称:PID-BO-CONTROLLER,代码行数:16,代码来源:pavement.py
示例7: commit
def commit():
"""Commit only if all the tests pass."""
if _test_all() == 0:
subprocess.check_call(['git', 'commit'])
else:
print_failure_message('\nTests failed, not committing.')
开发者ID:konstantinos-papadopoulos,项目名称:PID-BO-CONTROLLER,代码行数:6,代码来源:pavement.py
示例8: cov
def cov():
""" Get test coverage """
retcode = subprocess.call(
'py.test --cov-report term-missing --cov pyres', shell=True)
if retcode != 0:
print_failure_message('Failed running pytest')
开发者ID:jima80525,项目名称:pyres,代码行数:6,代码来源:pavement.py
注:本文中的setup.print_failure_message函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论