Metadata-Version: 1.0
Name: pytest-capturelog
Version: 0.5
Summary: py.test plugin to capture log messages
Home-page: http://bitbucket.org/memedough/pytest-capturelog/overview
Author: Meme Dough
Author-email: memedough@gmail.com
License: MIT License
Description: pytest-capturelog
        =================
        
        py.test plugin to capture log messages
        
        Usage
        -----
        
        Log messages are captured by default and for each failed test will be
        shown in the same manner as captured stdout and stderr.
        
        Running without options::
        
        py.test test_capturelog.py
        
        Shows failed tests like so::
        
        -------------------------- Captured log ---------------------------
        test_capturelog.py          26 INFO     text going to logger
        ------------------------- Captured stdout -------------------------
        text going to stdout
        ------------------------- Captured stderr -------------------------
        text going to stderr
        ==================== 2 failed in 0.02 seconds =====================
        
        By default each captured log message shows the module, line number,
        log level and message.  Showing the exact module and line number is
        useful for testing and debugging.  If desired the log format and date
        format can be specified to anything that the logging module supports.
        
        Running pytest specifying formatting options::
        
        py.test --log-format="%(asctime)s %(levelname)s %(message)s" --log-date-format="%Y-%m-%d %H:%M:%S" test_capturelog.py
        
        Shows failed tests like so::
        
        -------------------------- Captured log ---------------------------
        2010-04-10 14:48:44 INFO text going to logger
        ------------------------- Captured stdout -------------------------
        text going to stdout
        ------------------------- Captured stderr -------------------------
        text going to stderr
        ==================== 2 failed in 0.02 seconds =====================
        
        Further it is possible to disable capturing of logs completely with::
        
        py.test --nocapturelog test_capturelog.py
        
        Shows failed tests in the normal manner as no logs were captured::
        
        ------------------------- Captured stdout -------------------------
        text going to stdout
        ------------------------- Captured stderr -------------------------
        text going to stderr
        ==================== 2 failed in 0.02 seconds =====================
        
        Installation
        ------------
        
        With pip::
        
        pip install pytest-capturelog
        
        With easy install::
        
        easy_install pytest-capturelog
Keywords: py.test pytest
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Testing
