Update tests.py
Browse files
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 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
global destination_dir
|
| 250 |
-
|
| 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)
|