@@ -289,9 +289,6 @@ def test_plan(
289289 with capture_output () as output :
290290 notebook .run_line_magic (magic_name = "plan" , line = "--no-prompts --auto-apply" )
291291
292- # TODO: Should this be going to stdout? This is printing the status updates for when each batch finishes for
293- # the models and how long it took
294- assert len (output .stdout .strip ().split ("\n " )) == 46
295292 assert not output .stderr
296293 assert len (output .outputs ) == 4
297294 text_output = convert_all_html_output_to_text (output )
@@ -321,15 +318,70 @@ def test_run_dag(
321318 notebook .run_line_magic (magic_name = "run_dag" , line = "" )
322319
323320 assert not output .stdout .startswith (
324- "'Evaluating models ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 18/18"
321+ "'Executing model batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.0% • 18/18"
325322 )
326323 assert not output .stderr
327324 assert len (output .outputs ) == 6
328- assert convert_all_html_output_to_text (output ) == [
325+ html_text_actual = convert_all_html_output_to_text (output )
326+ html_text_expected = [
327+ "[2K" ,
328+ "Executing model batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━ 93.8% • 15/16 • 0:00:" ,
329+ "[1/1] sushi.waiter_as_customer_by_day [insert 2023-01-01 - 2023-01-02, audits ✔2]" ,
330+ "" ,
329331 "✔ Model batches executed" ,
330332 "Run finished for environment 'prod'" ,
331333 ]
334+ for txt_actual , txt_expected in zip (html_text_actual , html_text_expected ):
335+ assert txt_actual .startswith (txt_expected )
332336 assert get_all_html_output (output ) == [
337+ str (
338+ h (
339+ "pre" ,
340+ {"style" : RICH_PRE_STYLE },
341+ h (
342+ "span" ,
343+ "[2K" ,
344+ autoescape = False ,
345+ ),
346+ autoescape = False ,
347+ )
348+ ),
349+ str (
350+ h (
351+ "pre" ,
352+ {"style" : RICH_PRE_STYLE },
353+ h (
354+ "span" ,
355+ "Executing model batches ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━ 93.8% • 15/16 • 0:00:" ,
356+ autoescape = False ,
357+ ),
358+ autoescape = False ,
359+ )
360+ ),
361+ str (
362+ h (
363+ "pre" ,
364+ {"style" : RICH_PRE_STYLE },
365+ h (
366+ "span" ,
367+ "[1/1] sushi.waiter_as_customer_by_day [insert 2023-01-01 - 2023-01-02, audits ✔2]" ,
368+ autoescape = False ,
369+ ),
370+ autoescape = False ,
371+ )
372+ ),
373+ str (
374+ h (
375+ "pre" ,
376+ {"style" : RICH_PRE_STYLE },
377+ h (
378+ "span" ,
379+ "" ,
380+ autoescape = False ,
381+ ),
382+ autoescape = False ,
383+ )
384+ ),
333385 str (
334386 h (
335387 "pre" ,
0 commit comments