當前位置: 首頁>>代碼示例>>Python>>正文


Python coloredlogs.increase_verbosity方法代碼示例

本文整理匯總了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() 
開發者ID:paylogic,項目名稱:py2deb,代碼行數:29,代碼來源:tests.py


注:本文中的coloredlogs.increase_verbosity方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。