diff options
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r-- | Lib/test/test_doctest.py | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index ad52762..2258c6b 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -2431,11 +2431,6 @@ def test_unittest_reportflags(): Then the default eporting options are ignored: >>> result = suite.run(unittest.TestResult()) - """ - """ - *NOTE*: These doctest are intentionally not placed in raw string to depict - the trailing whitespace using `\x20` in the diff below. - >>> print(result.failures[0][1]) # doctest: +ELLIPSIS Traceback ... Failed example: @@ -2449,7 +2444,7 @@ def test_unittest_reportflags(): Differences (ndiff with -expected +actual): a - <BLANKLINE> - +\x20 + + b <BLANKLINE> <BLANKLINE> @@ -2938,47 +2933,6 @@ Invalid doctest option: """ -def test_no_trailing_whitespace_stripping(): - r""" - The fancy reports had a bug for a long time where any trailing whitespace on - the reported diff lines was stripped, making it impossible to see the - differences in line reported as different that differed only in the amount of - trailing whitespace. The whitespace still isn't particularly visible unless - you use NDIFF, but at least it is now there to be found. - - *NOTE*: This snippet was intentionally put inside a raw string to get rid of - leading whitespace error in executing the example below - - >>> def f(x): - ... r''' - ... >>> print('\n'.join(['a ', 'b'])) - ... a - ... b - ... ''' - """ - """ - *NOTE*: These doctest are not placed in raw string to depict the trailing whitespace - using `\x20` - - >>> test = doctest.DocTestFinder().find(f)[0] - >>> flags = doctest.REPORT_NDIFF - >>> doctest.DocTestRunner(verbose=False, optionflags=flags).run(test) - ... # doctest: +ELLIPSIS - ********************************************************************** - File ..., line 3, in f - Failed example: - print('\n'.join(['a ', 'b'])) - Differences (ndiff with -expected +actual): - - a - + a - b - TestResults(failed=1, attempted=1) - - *NOTE*: `\x20` is for checking the trailing whitespace on the +a line above. - We cannot use actual spaces there, as a commit hook prevents from committing - patches that contain trailing whitespace. More info on Issue 24746. - """ - ###################################################################### ## Main ###################################################################### |