mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Invalidate finder caches after creating a new script.
This commit is contained in:
parent
cfc1cc2996
commit
c8287efed3
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
# Common utility functions used by various script execution tests
|
||||
# e.g. test_cmd_line, test_cmd_line_script and test_runpy
|
||||
|
||||
import importlib
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
|
@ -93,6 +94,7 @@ def make_script(script_dir, script_basename, source):
|
|||
script_file = open(script_name, 'w', encoding='utf-8')
|
||||
script_file.write(source)
|
||||
script_file.close()
|
||||
importlib.invalidate_caches()
|
||||
return script_name
|
||||
|
||||
def make_zip_script(zip_dir, zip_basename, script_name, name_in_zip=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue