This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author djc
Recipients ajaksu2, brodie, djc, pitrou, r.david.murray
Date 2010-07-17.14:24:45
SpamBayes Score 0.0024735231
Marked as misclassified No
Message-id <1279376687.29.0.708887869415.issue9284@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a test case that doesn't require doctest trickery:

import inspect, linecache
fn, source = '<test>', 'def x(): pass\n'
getlines = linecache.getlines
def monkey(filename, module_globals=None):
     if filename == fn:
         return source.splitlines(True)
     else:
         return getlines(filename, module_globals)
linecache.getlines = monkey
exec compile(source, fn, 'single') in globals()
inspect.getsource(x)
History
Date User Action Args
2010-07-17 14:24:47djcsetrecipients: + djc, pitrou, ajaksu2, brodie, r.david.murray
2010-07-17 14:24:47djcsetmessageid: <1279376687.29.0.708887869415.issue9284@psf.upfronthosting.co.za>
2010-07-17 14:24:45djclinkissue9284 messages
2010-07-17 14:24:45djccreate