Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from zopefoundation/issue8
Fix ZOPE_WATCH_CHECKERS in pure-Python mode
- Loading branch information
Showing
9 changed files
with
142 additions
and
62 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# | ||
# This file is necessary to make this directory a package. | ||
import io | ||
|
||
|
||
class QuietWatchingChecker(object): | ||
# zope.testrunner does not support setUp/tearDownModule, | ||
# so we use a mixin class to make sure we don't flood stderr | ||
# with pointless printing when testing watching checkers | ||
|
||
def setUp(self): | ||
from zope.security import checker | ||
self.__old_file = checker.CheckerLoggingMixin._file | ||
checker.CheckerLoggingMixin._file = io.StringIO() if bytes is not str else io.BytesIO() | ||
|
||
def tearDown(self): | ||
from zope.security import checker | ||
checker.CheckerLoggingMixin._file = self.__old_file |
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
Oops, something went wrong.