summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 63d49fe5c7..eed67d09b8 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -160,15 +160,7 @@ class BaseTest(unittest.TestCase):
the expected_values list of tuples."""
stream = stream or self.stream
pat = re.compile(pat or self.expected_log_pat)
- try:
- if hasattr(stream, 'reset'):
- stream.reset()
- elif hasattr(stream, 'seek'):
- stream.seek(0)
- actual_lines = stream.readlines()
- except AttributeError:
- # StringIO.StringIO lacks a reset() method.
- actual_lines = stream.getvalue().splitlines()
+ actual_lines = stream.getvalue().splitlines()
self.assertEqual(len(actual_lines), len(expected_values))
for actual, expected in zip(actual_lines, expected_values):
match = pat.search(actual)