mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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) ........
This commit is contained in:
parent
0681785d09
commit
5e76e94fd4
5 changed files with 108 additions and 14 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue