[Python-checkins] r51930 - sandbox/trunk/setuptools/doctest.py
phillip.eby
python-checkins at python.org
Wed Sep 20 22:11:00 CEST 2006
Author: phillip.eby
Date: Wed Sep 20 22:11:00 2006
New Revision: 51930
Modified:
sandbox/trunk/setuptools/doctest.py
Log:
Python 2.5 compatibility fix
Modified: sandbox/trunk/setuptools/doctest.py
==============================================================================
--- sandbox/trunk/setuptools/doctest.py (original)
+++ sandbox/trunk/setuptools/doctest.py Wed Sep 20 22:11:00 2006
@@ -1328,13 +1328,13 @@
__LINECACHE_FILENAME_RE = re.compile(r'<doctest '
r'(?P<name>[\w\.]+)'
r'\[(?P<examplenum>\d+)\]>$')
- def __patched_linecache_getlines(self, filename):
+ def __patched_linecache_getlines(self, filename, module_globals=None):
m = self.__LINECACHE_FILENAME_RE.match(filename)
if m and m.group('name') == self.test.name:
example = self.test.examples[int(m.group('examplenum'))]
return example.source.splitlines(True)
else:
- return self.save_linecache_getlines(filename)
+ return self.save_linecache_getlines(filename, module_globals)
def run(self, test, compileflags=None, out=None, clear_globs=True):
"""
More information about the Python-checkins
mailing list