Author vinay.sajip
Recipients ezio.melotti, michael.foord, pitrou, r.david.murray, vinay.sajip
Date 2013-09-05.21:43:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378417416.53.0.123668636054.issue18937@psf.upfronthosting.co.za>
In-reply-to
Content
I agree a context manager would be useful. Note that I have already provided a Handler subclass (TestHandler) as well as a Matcher class which allows matching of LogRecords, and which can be used in assertions. These are in test.support as they were originally intended for Python's own tests, but could be moved to the logging package if they are considered more generally useful.

See this for how to use them:

http://plumberjack.blogspot.co.uk/2010/09/unit-testing-and-logging.html
History
Date User Action Args
2013-09-05 21:43:36vinay.sajipsetrecipients: + vinay.sajip, pitrou, ezio.melotti, r.david.murray, michael.foord
2013-09-05 21:43:36vinay.sajipsetmessageid: <1378417416.53.0.123668636054.issue18937@psf.upfronthosting.co.za>
2013-09-05 21:43:36vinay.sajiplinkissue18937 messages
2013-09-05 21:43:36vinay.sajipcreate