[TIP] py.test skip messages not showing up

Pella,Chris Chris.Pella at safenet-inc.com
Wed Dec 19 08:52:11 PST 2012


We have some tests that are being skipped if some preconditions are missed...
e.g.
if source_type == 'unsupported':
            pytest.skip("Unsupported configuration.")

We are hoping to be able to see that "Unsupported configuration" string  in the stdout so we can see why a test was skipped. How do we get py.test to send that string to stdout?  Also, as a general  suggestion it would be nice to have pytest send an lf so that it the pytest output doesn't run into our logging output, as you can see below.

Below is a snippet of Jenkins console from one of our tests.
2012-12-19 03:15:19,224:module:lunacm:INFO:HSM init completed successfully
PASSED
testcases/rbs/test_backup_init.py:48: TestRBSInit.test_backup_factory_reset[remote] SKIPPED2012-12-19 03:15:19,239:module:lunacm:INFO:LunaCM destroyed...
2012-12-19 03:15:19,640:module:Install_Client:INFO:                                Uninstalling Luna Client running /bin/bash /usr/safenet/lunaclient/bin/uninstall.sh...


Chris

The information contained in this electronic mail transmission 
may be privileged and confidential, and therefore, protected 
from disclosure. If you have received this communication in 
error, please notify us immediately by replying to this 
message and deleting it from your computer without copying 
or disclosing it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20121219/7490c483/attachment.htm>


More information about the testing-in-python mailing list