diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2010-06-12 13:42:46 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2010-06-12 13:42:46 (GMT) |
commit | 5e76e94fd45711d65b2f0958b090913e3eff5f49 (patch) | |
tree | bd166764c61b9317eb1c5b311e4c9502cad0f95d /Lib/doctest.py | |
parent | 0681785d09adb4de0cfd5cdeb2c70d6eeb690dde (diff) | |
download | cpython-5e76e94fd45711d65b2f0958b090913e3eff5f49.zip cpython-5e76e94fd45711d65b2f0958b090913e3eff5f49.tar.gz cpython-5e76e94fd45711d65b2f0958b090913e3eff5f49.tar.bz2 |
Merged revisions 80578 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80578 | nick.coghlan | 2010-04-29 00:29:06 +1000 (Thu, 29 Apr 2010) | 1 line
Issue 7490: make IGNORE_EXCEPTION_DETAIL also ignore details of the module containing the exception under test (original patch by Lennart Regebro)
........
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 3b32004..5111a73 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -1277,9 +1277,9 @@ class DocTestRunner: # Another chance if they didn't care about the detail. elif self.optionflags & IGNORE_EXCEPTION_DETAIL: - m1 = re.match(r'[^:]*:', example.exc_msg) - m2 = re.match(r'[^:]*:', exc_msg) - if m1 and m2 and check(m1.group(0), m2.group(0), + m1 = re.match(r'(?:[^:]*\.)?([^:]*:)', example.exc_msg) + m2 = re.match(r'(?:[^:]*\.)?([^:]*:)', exc_msg) + if m1 and m2 and check(m1.group(1), m2.group(1), self.optionflags): outcome = SUCCESS |