@@ -2431,11 +2431,6 @@ def test_unittest_reportflags():
24312431 Then the default eporting options are ignored:
24322432
24332433 >>> result = suite.run(unittest.TestResult())
2434- """
2435- """
2436- *NOTE*: These doctest are intentionally not placed in raw string to depict
2437- the trailing whitespace using `\x20 ` in the diff below.
2438-
24392434 >>> print(result.failures[0][1]) # doctest: +ELLIPSIS
24402435 Traceback ...
24412436 Failed example:
@@ -2449,7 +2444,7 @@ def test_unittest_reportflags():
24492444 Differences (ndiff with -expected +actual):
24502445 a
24512446 - <BLANKLINE>
2452- +\x20
2447+ +
24532448 b
24542449 <BLANKLINE>
24552450 <BLANKLINE>
@@ -2938,47 +2933,6 @@ def test_CLI(): r"""
29382933
29392934"""
29402935
2941- def test_no_trailing_whitespace_stripping ():
2942- r"""
2943- The fancy reports had a bug for a long time where any trailing whitespace on
2944- the reported diff lines was stripped, making it impossible to see the
2945- differences in line reported as different that differed only in the amount of
2946- trailing whitespace. The whitespace still isn't particularly visible unless
2947- you use NDIFF, but at least it is now there to be found.
2948-
2949- *NOTE*: This snippet was intentionally put inside a raw string to get rid of
2950- leading whitespace error in executing the example below
2951-
2952- >>> def f(x):
2953- ... r'''
2954- ... >>> print('\n'.join(['a ', 'b']))
2955- ... a
2956- ... b
2957- ... '''
2958- """
2959- """
2960- *NOTE*: These doctest are not placed in raw string to depict the trailing whitespace
2961- using `\x20 `
2962-
2963- >>> test = doctest.DocTestFinder().find(f)[0]
2964- >>> flags = doctest.REPORT_NDIFF
2965- >>> doctest.DocTestRunner(verbose=False, optionflags=flags).run(test)
2966- ... # doctest: +ELLIPSIS
2967- **********************************************************************
2968- File ..., line 3, in f
2969- Failed example:
2970- print('\n '.join(['a ', 'b']))
2971- Differences (ndiff with -expected +actual):
2972- - a
2973- + a
2974- b
2975- TestResults(failed=1, attempted=1)
2976-
2977- *NOTE*: `\x20 ` is for checking the trailing whitespace on the +a line above.
2978- We cannot use actual spaces there, as a commit hook prevents from committing
2979- patches that contain trailing whitespace. More info on Issue 24746.
2980- """
2981-
29822936######################################################################
29832937## Main
29842938######################################################################
0 commit comments