Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(352)

Delta Between Two Patch Sets: Lib/test/test_doctest.py

Issue 848043: doctest should normalize tabs when comparing output Base URL: http://svn.python.org/projects/python/trunk/
Left Patch Set: Created 15 years ago , Downloaded from: http://bugs.python.org/file16712/issue7583.doctest.tabs.diff
Right Patch Set: doctest should be raw docstring to avoid premature tab expansion Created 15 years ago , Downloaded from: http://bugs.python.org/file16721/issue7583.doctest.tabs.diff
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/doctest.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 """ 2 """
3 Test script for doctest. 3 Test script for doctest.
4 """ 4 """
5 5
6 import sys 6 import sys
7 from test import test_support 7 from test import test_support
8 import doctest 8 import doctest
9 9
10 # NOTE: There are some additional tests relating to interaction with 10 # NOTE: There are some additional tests relating to interaction with
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 def test_trailing_space_in_test(): 2058 def test_trailing_space_in_test():
2059 """ 2059 """
2060 Trailing spaces in expected output are significant: 2060 Trailing spaces in expected output are significant:
2061 2061
2062 >>> x, y = 'foo', '' 2062 >>> x, y = 'foo', ''
2063 >>> print x, y 2063 >>> print x, y
2064 foo \n 2064 foo \n
2065 """ 2065 """
2066 2066
2067 def test_tabs_in_test(): 2067 def test_tabs_in_test():
2068 """ 2068 r"""
2069 Tabs are expanded correctly: 2069 Tabs are expanded correctly:
2070 2070
2071 >>> print "\tx" 2071 >>> print "\tx"
2072 x 2072 x
2073 """ 2073 """
2074 2074
2075 def test_unittest_reportflags(): 2075 def test_unittest_reportflags():
2076 """Default unittest reporting flags can be set to control reporting 2076 """Default unittest reporting flags can be set to control reporting
2077 2077
2078 Here, we'll set the REPORT_ONLY_FIRST_FAILURE option so we see 2078 Here, we'll set the REPORT_ONLY_FIRST_FAILURE option so we see
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 r = tracer.results() 2483 r = tracer.results()
2484 print 'Writing coverage results...' 2484 print 'Writing coverage results...'
2485 r.write_results(show_missing=True, summary=True, 2485 r.write_results(show_missing=True, summary=True,
2486 coverdir=coverdir) 2486 coverdir=coverdir)
2487 2487
2488 if __name__ == '__main__': 2488 if __name__ == '__main__':
2489 if '-c' in sys.argv: 2489 if '-c' in sys.argv:
2490 test_coverage('/tmp/doctest.cover') 2490 test_coverage('/tmp/doctest.cover')
2491 else: 2491 else:
2492 test_main() 2492 test_main()
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b