@@ -23,17 +23,17 @@ def cleanup_logger(self):
2323
2424 def test_sets_logger_level_to_info (self ):
2525 """Test that configure_logging sets the logger level to INFO."""
26- shared .configure_logging (logger , logging .INFO )
26+ shared .configure_logging (logging .INFO , logger )
2727 assert logger .level == logging .INFO
2828
2929 def test_creates_two_handlers (self ):
3030 """Test that configure_logging creates exactly two handlers."""
31- shared .configure_logging (logger , logging .INFO )
31+ shared .configure_logging (logging .INFO , logger )
3232 assert len (logger .handlers ) == 2
3333
3434 def test_info_handler_goes_to_stdout (self , capsys ):
3535 """Test that INFO level messages go to stdout."""
36- shared .configure_logging (logger , logging .INFO )
36+ shared .configure_logging (logging .INFO , logger )
3737 logger .info ("Test info message" )
3838
3939 captured = capsys .readouterr ()
@@ -42,7 +42,7 @@ def test_info_handler_goes_to_stdout(self, capsys):
4242
4343 def test_warning_handler_goes_to_stdout (self , capsys ):
4444 """Test that WARNING level messages go to stdout."""
45- shared .configure_logging (logger , logging .INFO )
45+ shared .configure_logging (logging .INFO , logger )
4646 logger .warning ("Test warning message" )
4747
4848 captured = capsys .readouterr ()
@@ -51,7 +51,7 @@ def test_warning_handler_goes_to_stdout(self, capsys):
5151
5252 def test_error_handler_goes_to_stderr (self , capsys ):
5353 """Test that ERROR level messages go to stderr."""
54- shared .configure_logging (logger , logging .INFO )
54+ shared .configure_logging (logging .INFO , logger )
5555 logger .error ("Test error message" )
5656
5757 captured = capsys .readouterr ()
@@ -60,7 +60,7 @@ def test_error_handler_goes_to_stderr(self, capsys):
6060
6161 def test_critical_handler_goes_to_stderr (self , capsys ):
6262 """Test that CRITICAL level messages go to stderr."""
63- shared .configure_logging (logger , logging .INFO )
63+ shared .configure_logging (logging .INFO , logger )
6464 logger .critical ("Test critical message" )
6565
6666 captured = capsys .readouterr ()
@@ -76,15 +76,15 @@ def test_clears_existing_handlers(self):
7676 assert len (logger .handlers ) >= 1
7777
7878 # Configure logging
79- shared .configure_logging (logger , logging .INFO )
79+ shared .configure_logging (logging .INFO , logger )
8080
8181 # Verify old handlers were cleared and new ones added
8282 assert len (logger .handlers ) == 2
8383 assert dummy_handler not in logger .handlers
8484
8585 def test_formatter_uses_message_only (self , capsys ):
8686 """Test that the formatter outputs only the message without level/timestamp."""
87- shared .configure_logging (logger , logging .INFO )
87+ shared .configure_logging (logging .INFO , logger )
8888 logger .info ("Simple message" )
8989
9090 captured = capsys .readouterr ()
@@ -94,18 +94,18 @@ def test_formatter_uses_message_only(self, capsys):
9494
9595 def test_multiple_calls_dont_duplicate_handlers (self ):
9696 """Test that calling configure_logging multiple times doesn't duplicate handlers."""
97- shared .configure_logging (logger , logging .INFO )
97+ shared .configure_logging (logging .INFO , logger )
9898 assert len (logger .handlers ) == 2
9999
100- shared .configure_logging (logger , logging .INFO )
100+ shared .configure_logging (logging .INFO , logger )
101101 assert len (logger .handlers ) == 2 # Still 2, not 4
102102
103- shared .configure_logging (logger , logging .INFO )
103+ shared .configure_logging (logging .INFO , logger )
104104 assert len (logger .handlers ) == 2 # Still 2, not 6
105105
106106 def test_configure_with_debug_level (self , capsys ):
107107 """Test that configure_logging accepts DEBUG level."""
108- shared .configure_logging (logger , logging .DEBUG )
108+ shared .configure_logging (logging .DEBUG , logger )
109109
110110 # DEBUG messages should now be logged
111111 logger .debug ("Debug message" )
@@ -116,7 +116,7 @@ def test_configure_with_debug_level(self, capsys):
116116
117117 def test_configure_with_warning_level (self , capsys ):
118118 """Test that configure_logging accepts WARNING level."""
119- shared .configure_logging (logger , logging .WARNING )
119+ shared .configure_logging (logging .WARNING , logger )
120120
121121 # INFO messages should be suppressed
122122 logger .info ("Info message" )
@@ -130,7 +130,7 @@ def test_configure_with_warning_level(self, capsys):
130130
131131 def test_configure_with_info_level_suppresses_debug (self , capsys ):
132132 """Test that INFO level suppresses DEBUG messages."""
133- shared .configure_logging (logger , logging .INFO )
133+ shared .configure_logging (logging .INFO , logger )
134134
135135 logger .debug ("Debug message" )
136136 logger .info ("Info message" )
0 commit comments