[Webkit-unassigned] [Bug 46635] webkitpy.layout_tests.layout_package.printing_unittest.TestUtilityFunctions.test_configure_logging should use OutputCapture

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 27 14:54:41 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=46635





--- Comment #2 from Eric Seidel <eric at webkit.org>  2010-09-27 14:54:41 PST ---
Interesting.  OutputCapture replaces stderr/stdout with a tee() (see deprecatedlogging.py).  It's possible that the logging handler installs its own tee of sorts after OutputCapture does.

Eventually the plan is to get rid of all uses of log() and error() from deprecatedlogging.py.  Those were written by me long before I had even heard of python's logging infrastructure.  Unfortunately I don't really understand python's logging stuff yet, or I would have done the replacements already.

When we eventually move to using python's built-in logging.py then we may have to re-think how OutputCapture works, or how we go about testing logging at all in the unit tests.  OutputCapture tests have proven *hugely* useful in the past.  Particularly for ease of dealing with mocks.  (Making a Mock call log("MOCK: method_name") is an easy to way to see what methods were called across all mocks duringthe invocation of your method under test.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list