[Python-checkins] r62323 - python/trunk/Lib/test/test_warnings.py
brett.cannon
python-checkins at python.org
Sun Apr 13 19:09:43 CEST 2008
Author: brett.cannon
Date: Sun Apr 13 19:09:43 2008
New Revision: 62323
Log:
Add an explicit check for output in a test to try to diagnose a failure on
Windows.
Modified:
python/trunk/Lib/test/test_warnings.py
Modified: python/trunk/Lib/test/test_warnings.py
==============================================================================
--- python/trunk/Lib/test/test_warnings.py (original)
+++ python/trunk/Lib/test/test_warnings.py Sun Apr 13 19:09:43 2008
@@ -328,7 +328,10 @@
"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.split(':')
+ self.assertEquals(len(first_line_parts), 4,
+ "%r does not split into 4 parts" % first_line)
+ path, line, warning_class, message = first_line_parts
line = int(line)
self.failUnlessEqual(expected_file, path)
self.failUnlessEqual(warning_class, ' ' + UserWarning.__name__)
More information about the Python-checkins
mailing list