summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-12-04 12:29:05 (GMT)
committerGitHub <noreply@github.com>2017-12-04 12:29:05 (GMT)
commit70d56fb52582d9d3f7c00860d6e90570c6259371 (patch)
tree61e54b78f19535bfcf41d521b98def725de63497 /Lib/doctest.py
parente69fbb6a560a02d0587b9075afd338a1e9073af0 (diff)
downloadcpython-70d56fb52582d9d3f7c00860d6e90570c6259371.zip
cpython-70d56fb52582d9d3f7c00860d6e90570c6259371.tar.gz
cpython-70d56fb52582d9d3f7c00860d6e90570c6259371.tar.bz2
bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. (#4471)
Also fixed searching patterns that could match an empty string.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 5e5bc21..c1d8a1d 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -1611,7 +1611,7 @@ class OutputChecker:
'', want)
# If a line in got contains only spaces, then remove the
# spaces.
- got = re.sub(r'(?m)^\s*?$', '', got)
+ got = re.sub(r'(?m)^[^\S\n]+$', '', got)
if got == want:
return True