[Checkins] SVN: zc.buildout/trunk/src/zc/buildout/testing_bugfix.txt Updated test to more closely match intent to avoid spurious failure.
Jim Fulton
jim at zope.com
Thu Mar 17 11:57:23 EDT 2011
Log message for revision 121008:
Updated test to more closely match intent to avoid spurious failure.
Changed:
U zc.buildout/trunk/src/zc/buildout/testing_bugfix.txt
-=-
Modified: zc.buildout/trunk/src/zc/buildout/testing_bugfix.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/testing_bugfix.txt 2011-03-17 15:39:00 UTC (rev 121007)
+++ zc.buildout/trunk/src/zc/buildout/testing_bugfix.txt 2011-03-17 15:57:23 UTC (rev 121008)
@@ -12,8 +12,7 @@
The handers before calling set up are:
>>> import logging
- >>> len(logging.getLogger().handlers)
- 1
+ >>> oldn = len(logging.getLogger().handlers)
>>> logging.getLogger().handlers # doctest: +ELLIPSIS
[<zope...testrunner.logsupport.NullHandler instance at ...>]
@@ -24,8 +23,9 @@
>>> test = doctest.DocTestParser().get_doctest(
... '>>> x', {}, 'foo', 'foo.py', 0)
>>> zc.buildout.testing.buildoutSetUp(test)
- >>> len(logging.getLogger().handlers)
- 2
+ >>> len(logging.getLogger().handlers) == oldn + 1
+ True
+
>>> logging.getLogger().handlers # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
[<zope...testrunner.logsupport.NullHandler instance at ...>,
<logging.StreamHandler instance at ...>]
@@ -33,7 +33,8 @@
But tear down removes the new logging handler:
>>> zc.buildout.testing.buildoutTearDown(test)
- >>> len(logging.getLogger().handlers)
- 1
+ >>> len(logging.getLogger().handlers) == oldn
+ True
+
>>> logging.getLogger().handlers # doctest: +ELLIPSIS
[<zope...testrunner.logsupport.NullHandler instance at ...>]
More information about the checkins
mailing list