This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rbcollins
Recipients ezio.melotti, michael.foord, r.david.murray, rbcollins, zach.ware
Date 2015-08-21.00:23:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Ok so, design thoughts here.

assertLogs really does two things. Firstly it takes a copy of the logs so it can do its assertion.

Secondly it disables all other logging, cleaning up noisy tests.

Your specific need only conflicts with the second case.

The way I handle this in 'fixtures' is to automatically attach the logs to the test output, which means failures show the logs. (Successes have them too, but they are not shown by default).

Ignoring the mismatch between stock unittest and fixtures supporting unittests, does this sound like it would meet your needs? e.g. you'd use your global to make attachments be shown on success as well as failure, and then you'd have nearly identical behaviour. But not exactly:  it would still disable the during-execution output (which makes parallel and CI runs a lot nicer - the report at the end is the key).
Date User Action Args
2015-08-21 00:23:36rbcollinssetrecipients: + rbcollins, ezio.melotti, r.david.murray, michael.foord, zach.ware
2015-08-21 00:23:36rbcollinssetmessageid: <>
2015-08-21 00:23:36rbcollinslinkissue24352 messages
2015-08-21 00:23:35rbcollinscreate