Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81649

Logging with unittest

Newsgroups comp.lang.python
Date 2014-11-27 13:37 -0800
Message-ID <61a5d11a-716e-476c-9d17-d2703dcabba5@googlegroups.com> (permalink)
Subject Logging with unittest
From Jared Windover <jaredwindover@gmail.com>

Show all headers | View raw


I've been working with unittest for a while and just started using logging, and my question is: is it possible to use logging to display information about the tests you're running, but still have it be compatible with the --buffer option so that you only see it if a test fails? It seems like it would be a useful (and more standard than print statements) way to include stuff like parameter values near where a test may fail. 

What I currently have happening is that the logging output is shown regardless of whether or not the -b (or --buffer) flag is present. Any thoughts?

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Logging with unittest Jared Windover <jaredwindover@gmail.com> - 2014-11-27 13:37 -0800

csiph-web