@@ -319,7 +319,7 @@ def setUp(self):
319319
320320 def print_test_result (self , test_name , * checks ):
321321 all_passed = all (checks )
322- print_test_result (f"{ test_name } , server_mode: { self . server_mode } " , all_passed , True , True )
322+ print_test_result (f"{ test_name } " , all_passed , self . server_mode , True )
323323
324324 def run_magic_test (self , line , cell , expect_none = False ):
325325 # Mock the run_query method to return a known DataFrame.
@@ -338,41 +338,39 @@ def run_magic_test(self, line, cell, expect_none=False):
338338
339339 def test_line_magic_query (self ):
340340 checks = self .run_magic_test (line = self .query , cell = None )
341- self .print_test_result ("Line magic test" , * checks )
341+ self .print_test_result ("Line magic query test" , * checks )
342342
343343 def test_cell_magic_query (self ):
344344 checks = self .run_magic_test (line = "" , cell = self .query )
345- self .print_test_result ("Cell magic test" , * checks )
345+ self .print_test_result ("Cell magic query test" , * checks )
346346
347347 def test_cell_magic_query_no_output (self ):
348348 checks = self .run_magic_test (line = "--no-display" , cell = self .query , expect_none = True )
349- self .print_test_result ("Cell magic test (with --no-display)" , * checks )
349+ self .print_test_result ("Cell magic query test (with --no-display)" , * checks )
350350
351351 def run_magic_statement_test (self , line , cell , expect_none = False ):
352352 # Execute the magic with our statement.
353353 result = self .stackql_magic .stackql (line = line , cell = cell )
354354 # Validate the outcome.
355355 checks = []
356- if expect_none :
357- checks .append (result is None )
358- else :
359- # Check that the output contains expected content
356+ # Check that the output contains expected content
357+ if not expect_none :
360358 checks .append ("OK" in result ["message" ].iloc [0 ])
361359 checks .append ('stackql_df' in self .shell .user_ns )
362360 checks .append ("OK" in self .shell .user_ns ['stackql_df' ]["message" ].iloc [0 ])
363361 return checks
364362
365363 def test_line_magic_statement (self ):
366364 checks = self .run_magic_statement_test (line = self .statement , cell = None )
367- self .print_test_result ("Line magic statement" , * checks )
365+ self .print_test_result (f "Line magic statement test \n { str ( checks ) } " , * checks )
368366
369367 def test_cell_magic_statement (self ):
370368 checks = self .run_magic_statement_test (line = "" , cell = self .statement )
371- self .print_test_result ("Cell magic statement" , * checks )
369+ self .print_test_result (f "Cell magic statement test \n { str ( checks ) } " , * checks )
372370
373371 def test_cell_magic_statement_no_output (self ):
374372 checks = self .run_magic_statement_test (line = "--no-display" , cell = self .statement , expect_none = True )
375- self .print_test_result ("Cell magic statement (with --no-display)" , * checks )
373+ self .print_test_result (f "Cell magic statement test (with --no-display)\n { str ( checks ) } " , * checks )
376374
377375class StackQLMagicTests (BaseStackQLMagicTests , unittest .TestCase ):
378376
0 commit comments