[svn r37620] ensure 2.5 compatibility

--HG--
branch : trunk
This commit is contained in:
fijal 2007-01-30 17:54:14 +01:00
parent e905f71e72
commit 1974e5ecf6
1 changed files with 1 additions and 1 deletions

View File

@ -1324,7 +1324,7 @@ class DocTestRunner:
__LINECACHE_FILENAME_RE = re.compile(r'<doctest ' __LINECACHE_FILENAME_RE = re.compile(r'<doctest '
r'(?P<name>[\w\.]+)' r'(?P<name>[\w\.]+)'
r'\[(?P<examplenum>\d+)\]>$') r'\[(?P<examplenum>\d+)\]>$')
def __patched_linecache_getlines(self, filename): def __patched_linecache_getlines(self, filename, additional_arg=None):
m = self.__LINECACHE_FILENAME_RE.match(filename) m = self.__LINECACHE_FILENAME_RE.match(filename)
if m and m.group('name') == self.test.name: if m and m.group('name') == self.test.name:
example = self.test.examples[int(m.group('examplenum'))] example = self.test.examples[int(m.group('examplenum'))]