本文整理汇总了Python中coloredlogs.increase_verbosity方法的典型用法代码示例。如果您正苦于以下问题:Python coloredlogs.increase_verbosity方法的具体用法?Python coloredlogs.increase_verbosity怎么用?Python coloredlogs.increase_verbosity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coloredlogs
的用法示例。
在下文中一共展示了coloredlogs.increase_verbosity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpModule
# 需要导入模块: import coloredlogs [as 别名]
# 或者: from coloredlogs import increase_verbosity [as 别名]
def setUpModule():
"""
Prepare the test suite.
This function does two things:
1. Sets up verbose logging to the terminal. When a test fails the logging
output can help to perform a post-mortem analysis of the failure in
question (even when its hard to reproduce locally). This is especially
useful when debugging remote test failures, whether they happened on
Travis CI or a user's local system.
2. Creates temporary directories where the pip download cache and the
pip-accel binary cache are located. Isolating the pip-accel binary cache
from the user's system is meant to ensure that the tests are as
independent from the user's system as possible. The function
:func:`tearDownModule` is responsible for cleaning up the temporary
directory after the test suite finishes.
"""
# Initialize verbose logging to the terminal.
coloredlogs.install()
coloredlogs.increase_verbosity()
# Create temporary directories to store the pip download cache and
# pip-accel's binary cache, to make sure these tests run isolated from the
# rest of the system.
os.environ['PIP_DOWNLOAD_CACHE'] = create_temporary_directory()
os.environ['PIP_ACCEL_CACHE'] = create_temporary_directory()