diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-29 08:39:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-29 08:39:48 (GMT) |
commit | 48e6a8c88a69adbdc7c3bf9adef5696828b1c5fe (patch) | |
tree | 45c7d23b65375342454fa469c9479b22f6c69a77 /Lib/test/test_logging.py | |
parent | a8c2a8aa8dcf236355348adf696d2aae8fbe45b2 (diff) | |
parent | 50254c57cd7a562441b7ff385d59c0255301f3ff (diff) | |
download | cpython-48e6a8c88a69adbdc7c3bf9adef5696828b1c5fe.zip cpython-48e6a8c88a69adbdc7c3bf9adef5696828b1c5fe.tar.gz cpython-48e6a8c88a69adbdc7c3bf9adef5696828b1c5fe.tar.bz2 |
Issue #18743: Fix references to non-existant "StringIO" module
in docstrings and comments.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 63d49fe..eed67d0 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) |