akiko19191 commited on
Commit
717f61e
·
verified ·
1 Parent(s): f0e9baf

Update tests.py

Browse files
Files changed (1) hide show
  1. tests.py +2 -2
tests.py CHANGED
@@ -247,7 +247,7 @@ def run_code(language:str,packages:str,filename: str, code: str,start_cmd:str,fo
247
  command="npm install "
248
  else:
249
  command="ls"
250
- if packages != "" or packages != " ":
251
  package_logs=run(
252
  f"{command} {package_names}", timeout_sec=300,forever_cmd= 'false'
253
  )
@@ -259,7 +259,7 @@ def run_code(language:str,packages:str,filename: str, code: str,start_cmd:str,fo
259
  f.write(code)
260
  f.close()
261
  global files_list
262
- if start_cmd != "" or start_cmd != " ":
263
  stdot=run(start_cmd, 120,forever_cmd)
264
  else:
265
  stdot="File created successfully."
 
247
  command="npm install "
248
  else:
249
  command="ls"
250
+ if packages != "" and packages != " ":
251
  package_logs=run(
252
  f"{command} {package_names}", timeout_sec=300,forever_cmd= 'false'
253
  )
 
259
  f.write(code)
260
  f.close()
261
  global files_list
262
+ if start_cmd != "" and start_cmd != " ":
263
  stdot=run(start_cmd, 120,forever_cmd)
264
  else:
265
  stdot="File created successfully."