Cache Script._get_module

This commit is contained in:
Dave Halter committed 2018-12-05 18:18:26 +01:00
1 parent 9766abf1c5
commit 3d4f241129
1 file changed
+3
+3
View File
@@ -143,6 +143,9 @@ class Script(object):
cache.clear_time_caches()
debug.reset_time()
# Cache the module, this is mostly useful for testing, since this shouldn't
# be called multiple times.
@cache.memoize_method
def _get_module(self):
names = ('__main__',)
if self.path is not None: