@@ -187,7 +187,7 @@ def test_set_existing_python_path():
187
187
def test_new_python_path ():
188
188
torchserve ._set_python_path ()
189
189
190
- code_dir_path = "{}:" . format ( environment .code_dir )
190
+ code_dir_path = environment .code_dir
191
191
192
192
assert os .environ [torchserve .PYTHON_PATH_ENV ] == code_dir_path
193
193
@@ -275,7 +275,8 @@ def test_add_sigterm_handler(signal_call):
275
275
@patch ("subprocess.check_call" )
276
276
def test_install_requirements (check_call ):
277
277
torchserve ._install_requirements ()
278
-
278
+ for i in ['pip' , 'install' , '-r' , '/opt/ml/model/code/requirements.txt' ]:
279
+ assert i in check_call .call_args .args [0 ]
279
280
280
281
@patch ("subprocess.check_call" , side_effect = subprocess .CalledProcessError (0 , "cmd" ))
281
282
def test_install_requirements_installation_failed (check_call ):
@@ -307,7 +308,7 @@ def test_retrieve_ts_server_process_no_server(process_iter, retry):
307
308
with pytest .raises (Exception ) as e :
308
309
torchserve ._retrieve_ts_server_process ()
309
310
310
- assert "ts model server was unsuccessfully started" in str (e .value )
311
+ assert "Torchserve model server was unsuccessfully started" in str (e .value )
311
312
312
313
313
314
@patch ("retrying.Retrying.should_reject" , return_value = False )
0 commit comments