commit | 70d56fb52582d9d3f7c00860d6e90570c6259371 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Mon Dec 04 14:29:05 2017 +0200 |
committer | GitHub <noreply@github.com> | Mon Dec 04 14:29:05 2017 +0200 |
tree | 61e54b78f19535bfcf41d521b98def725de63497 | |
parent | e69fbb6a560a02d0587b9075afd338a1e9073af0 [diff] [blame] |
bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. (#4471) Also fixed searching patterns that could match an empty string.
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 @@ '', 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