akiko19191 commited on
Commit
202b86d
·
verified ·
1 Parent(s): 8be4679

Update tests.py

Browse files
Files changed (1) hide show
  1. tests.py +5 -5
tests.py CHANGED
@@ -242,12 +242,12 @@ def run_code(python_packages:str,filename: str, code: str,start_cmd:str,forever_
242
  command="pip install"
243
  if not package_names:
244
  pass
245
-
246
- run(
247
- f"{command} --break-system-packages {package_names}", timeout_sec=300
248
- )
249
  global destination_dir
250
- #download_all_files("https://opengpt-4ik5.onrender.com", "/upload", "/app/code_interpreter")
251
  transfer_files()
252
  f = open(os.path.join(destination_dir, filename), "w")
253
  f.write(code)
 
242
  command="pip install"
243
  if not package_names:
244
  pass
245
+ else:
246
+ run(
247
+ f"{command} --break-system-packages {package_names}", timeout_sec=300
248
+ )
249
  global destination_dir
250
+ download_all_files("https://opengpt-4ik5.onrender.com", "/upload", "/app/code_interpreter")
251
  transfer_files()
252
  f = open(os.path.join(destination_dir, filename), "w")
253
  f.write(code)