@@ -47,7 +47,8 @@ def test_log_info_to_console():
4747 random_string = '' .join (random .choice (letters ) for i in range (10 ))
4848 commun .log_info (random_string )
4949 # check $IRISINSTALLDIR/mgr/messages.log last line
50- with open (os .path .join (os .environ ['IRISINSTALLDIR' ], 'mgr' , 'messages.log' ), 'r' ) as file :
50+ install_dir = os .getenv ('IRISINSTALLDIR' ,None ) or os .getenv ('ISC_PACKAGE_INSTALLDIR' ,None )
51+ with open (os .path .join (install_dir , 'mgr' , 'messages.log' ), 'r' ) as file :
5152 lines = file .readlines ()
5253 last_line = lines [- 1 ]
5354 assert random_string in last_line
@@ -60,7 +61,8 @@ def test_log_info_to_console_from_method():
6061 random_string = '' .join (random .choice (letters ) for i in range (10 ))
6162 commun .trace (message = random_string , to_console = True )
6263 # check $IRISINSTALLDIR/mgr/messages.log last line
63- with open (os .path .join (os .environ ['IRISINSTALLDIR' ], 'mgr' , 'messages.log' ), 'r' ) as file :
64+ install_dir = os .getenv ('IRISINSTALLDIR' ,None ) or os .getenv ('ISC_PACKAGE_INSTALLDIR' ,None )
65+ with open (os .path .join (install_dir , 'mgr' , 'messages.log' ), 'r' ) as file :
6466 lines = file .readlines ()
6567 last_line = lines [- 1 ]
6668 assert random_string in last_line
0 commit comments