@@ -458,13 +458,13 @@ def replace_command_with_check(self, pos, old, new):
458
458
setattr (new_listing , attr , val )
459
459
self .listings [pos ] = new_listing
460
460
461
- def _run_tree (self , target = "" ):
461
+ def _run_tree (self , target = "" , no_report = False ):
462
462
return self .sourcetree .run_command (
463
- f"tree -v -I __pycache__ --noreport { target } "
463
+ f"tree -v -I __pycache__ { ' --noreport' if no_report else '' } { target } "
464
464
)
465
465
466
466
def assert_directory_tree_correct (self , expected_tree ):
467
- actual_tree = self ._run_tree ()
467
+ actual_tree = self ._run_tree (no_report = True )
468
468
self .assert_console_output_correct (actual_tree , expected_tree )
469
469
470
470
def assert_all_listings_checked (self , listings , exceptions = []):
@@ -847,15 +847,14 @@ def recognise_listing_and_process_it(self):
847
847
ls = listing .startswith ("ls" )
848
848
self .assert_console_output_correct (output , next_listing , ls = ls )
849
849
next_listing .was_checked = True
850
- listing .was_checked = True
851
850
self .pos += 2
852
851
elif "tree" in listing and next_listing .type == "tree" :
853
852
assert listing .startswith ("tree" )
854
853
_ , _ , target = listing .partition ("tree" )
855
854
output = self ._run_tree (target = target )
855
+ listing .was_run = True
856
856
self .assert_console_output_correct (output , next_listing )
857
857
next_listing .was_checked = True
858
- listing .was_checked = True
859
858
self .pos += 2
860
859
else :
861
860
self .run_command (listing , ignore_errors = listing .ignore_errors )
0 commit comments