This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webkitpy: Add contextmanager to disable logging for a block
https://bugs.webkit.org/show_bug.cgi?id=172876 Reviewed by Daniel Bates. Add a context manager which will use an OutputCapture object to capture logging in a block and hold it in a variable. * Scripts/webkitpy/common/system/outputcapture.py: (OutputCaptureScope): (OutputCaptureScope.__init__): Construct with OutputCapture object. (OutputCaptureScope.__enter__): Begin capturing output. (OutputCaptureScope.__exit__): Restore output and save captured output to a variable. output and retain the resulting log. * Scripts/webkitpy/common/system/outputcapture_unittest.py: (OutputCaptureTest.test_output_capture_scope): Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@217758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
jbedard@apple.com
committed
Jun 3, 2017
1 parent
1d8abaf
commit 1f6b5b8
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters