Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(33)

Unified Diff: Lib/packaging/tests/support.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/packaging/tests/__main__.py ('k') | Lib/packaging/tests/test_command_build_ext.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/packaging/tests/support.py Tue Jul 26 09:37:46 2011 +0300
+++ b/Lib/packaging/tests/support.py Mon Jul 25 09:47:18 2011 -0400
@@ -28,11 +28,13 @@
"""
import os
+import errno
import shutil
import logging
import weakref
import tempfile
+from packaging import logger
from packaging.dist import Distribution
from packaging.tests import unittest
from test.support import requires_zlib, unlink
@@ -42,10 +44,6 @@
'skip_unless_symlink', 'requires_zlib']
-logger = logging.getLogger('packaging')
-logger2to3 = logging.getLogger('RefactoringTool')
-
-
class _TestHandler(logging.handlers.BufferingHandler):
# stolen and adapted from test.support
@@ -76,10 +74,9 @@
def setUp(self):
super(LoggingCatcher, self).setUp()
self.loghandler = handler = _TestHandler()
- self._old_levels = logger.level, logger2to3.level
+ self.old_level = logger.level
logger.addHandler(handler)
logger.setLevel(logging.DEBUG) # we want all messages
- logger2to3.setLevel(logging.CRITICAL) # we don't want 2to3 messages
def tearDown(self):
handler = self.loghandler
@@ -90,8 +87,7 @@
for ref in weakref.getweakrefs(handler):
logging._removeHandlerRef(ref)
del self.loghandler
- logger.setLevel(self._old_levels[0])
- logger2to3.setLevel(self._old_levels[1])
+ logger.setLevel(self.old_level)
super(LoggingCatcher, self).tearDown()
def get_logs(self, *levels):
« no previous file with comments | « Lib/packaging/tests/__main__.py ('k') | Lib/packaging/tests/test_command_build_ext.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+