Kaydet (Commit) c477427e authored tarafından Brett Cannon's avatar Brett Cannon

Fix spliting on colons on Windows machines with a file path by limiting the

number of splits.
üst 25bb8182
......@@ -328,9 +328,7 @@ 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'
first_line_parts = first_line.split(':')
self.assertEquals(len(first_line_parts), 4,
"%r does not split into 4 parts" % first_line)
first_line_parts = first_line.rsplit(':', 3)
path, line, warning_class, message = first_line_parts
line = int(line)
self.failUnlessEqual(expected_file, path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment