issue #477: _update_linecache() must append newlines.

This commit is contained in:
David Wilson 2019-01-23 12:44:08 +00:00
parent 19b708e141
commit e9706a4a09
2 changed files with 6 additions and 1 deletions

View File

@ -1117,7 +1117,7 @@ class Importer(object):
linecache.cache[path] = ( linecache.cache[path] = (
len(data), len(data),
0.0, 0.0,
data.splitlines(), [line+'\n' for line in data.splitlines()],
path, path,
) )

View File

@ -212,5 +212,10 @@ class ImporterBlacklistTest(testlib.TestCase):
self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins')) self.assertTrue(mitogen.core.is_blacklisted_import(importer, 'builtins'))
class Python24LineCacheTest(testlib.TestCase):
# TODO: mitogen.core.Importer._update_linecache()
pass
if __name__ == '__main__': if __name__ == '__main__':
unittest2.main() unittest2.main()