@@ -43,27 +43,24 @@ def test_first_initialize(self):
4343 with self .assertLogs (pathwaysutils ._logger , level = "DEBUG" ) as logs :
4444 pathwaysutils .initialize ()
4545
46- self .assertLen (logs .output , 1 )
46+ self .assertLen (logs .output , 2 )
4747 self .assertIn (
48- "Detected Pathways-on-Cloud backend. Applying changes." , logs .output [0 ]
48+ "Starting initialize." , logs .output [0 ]
49+ )
50+ self .assertIn (
51+ "Detected Pathways-on-Cloud backend. Applying changes." , logs .output [1 ]
4952 )
50-
51- def test_second_initialize (self ):
52- jax .config .update ("jax_platforms" , "proxy" )
53- pathwaysutils ._initialization_count = 1
54-
55- with self .assertNoLogs (pathwaysutils ._logger , level = "DEBUG" ):
56- pathwaysutils .initialize ()
5753
5854 @parameterized .named_parameters (
55+ ("initialization_count 1" , 1 ),
5956 ("initialization_count 2" , 2 ),
6057 ("initialization_count 5" , 5 ),
6158 ("initialization_count 1000" , 1000 ),
6259 )
63- def test_initialize_more_than_twice (self , initialization_count ):
60+ def test_initialize_more_than_once (self , initialization_count ):
6461 pathwaysutils ._initialization_count = initialization_count
6562
66- with self .assertLogs (pathwaysutils ._logger , level = "DEBUG " ) as logs :
63+ with self .assertLogs (pathwaysutils ._logger , level = "INFO " ) as logs :
6764 pathwaysutils .initialize ()
6865
6966 self .assertLen (logs .output , 1 )
@@ -107,4 +104,4 @@ def test_persistence_enabled(self):
107104
108105
109106if __name__ == "__main__" :
110- absltest .main ()
107+ absltest .main ()
0 commit comments