summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_warnings.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index c4fce47..d8aee79 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -328,7 +328,8 @@ class _WarningsTests(BaseTest):
"Too many newlines in %r" % result)
first_line, second_line = result.split('\n', 1)
expected_file = os.path.splitext(warning_tests.__file__)[0] + '.py'
- path, line, warning_class, message = first_line.split(':')
+ first_line_parts = first_line.rsplit(':', 3)
+ path, line, warning_class, message = first_line_parts
line = int(line)
self.failUnlessEqual(expected_file, path)
self.failUnlessEqual(warning_class, ' ' + UserWarning.__name__)