Skip to content

Commit 12af0d6

Browse files
committed
add review address
1 parent 622dfb0 commit 12af0d6

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Lib/test/test_doctest/test_doctest.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,22 +1449,22 @@ def optionflags(): r"""
14491449
14501450
The IGNORE_CASE flag causes the test runner to ignore case when
14511451
matching the expected output to the actual output.
1452-
>>> print("Hello World") # doctest: +IGNORE_CASE
1452+
1453+
>>> print("HeLlO WoRlD") # doctest: +IGNORE_CASE
14531454
hello world
14541455
14551456
It can resolve the issues with POSIX and Windows NAN and other types.
14561457
On Windows this should fail without the flag.
1458+
14571459
>>> float("NaN") # doctest: +IGNORE_CASE
14581460
nan
14591461
1460-
On POSIX this should fail.
1461-
>>> float("NaN") # doctest: +IGNORE_CASE
1462-
NaN
1462+
It also works with boolean values.
14631463
1464-
>>> float("nan") # doctest: +IGNORE_CASE
1465-
nan
1466-
>>> float("nan") # doctest: +IGNORE_CASE
1467-
NaN
1464+
>>> print("tRuE") # doctest: +IGNORE_CASE
1465+
1
1466+
>>> print("FaLsE") # doctest: +IGNORE_CASE
1467+
0
14681468
14691469
14701470
The SKIP flag causes an example to be skipped entirely. I.e., the

Misc/NEWS.d/next/Library/2020-11-29-00-38-32.bpo-13337.rSk6U7.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds the :const:`~doctest.IGNORE_CASE` flag to the :mod:`doctest` module. Patch by Justin Baum.

0 commit comments

Comments
 (0)