summaryrefslogtreecommitdiff
path: root/Lib/test/script_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r--Lib/test/script_helper.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py
index 4d5c1f120a..af0545bac2 100644
--- a/Lib/test/script_helper.py
+++ b/Lib/test/script_helper.py
@@ -101,8 +101,10 @@ def kill_python(p):
subprocess._cleanup()
return data
-def make_script(script_dir, script_basename, source):
- script_filename = script_basename+os.extsep+'py'
+def make_script(script_dir, script_basename, source, omit_suffix=False):
+ script_filename = script_basename
+ if not omit_suffix:
+ script_filename += os.extsep + 'py'
script_name = os.path.join(script_dir, script_filename)
# The script should be encoded to UTF-8, the default string encoding
script_file = open(script_name, 'w', encoding='utf-8')