diff --git a/script/split_tests.py b/script/split_tests.py index 334ce20ef8b..f1da6a3f75b 100755 --- a/script/split_tests.py +++ b/script/split_tests.py @@ -106,17 +106,26 @@ class BucketHolder: # Ensure all files from the same folder are in the same bucket # to ensure that syrupy correctly identifies unused snapshots if is_file: + added_tests = [] for other_test in tests.parent.children.values(): if other_test is tests or isinstance(other_test, TestFolder): continue - print( - f"Adding {other_test.path} tests to same bucket due syrupy" - ) smallest_bucket.add(other_test) + added_tests.append(other_test) add_not_measured_files( other_test, not_measured_tests, ) + if added_tests: + print( + f"Added {len(added_tests)} tests to the same bucket so syrupy can identify unused snapshots" + ) + print( + " - " + + "\n - ".join( + str(test.path) for test in sorted(added_tests) + ) + ) # verify that all tests are added to a bucket if not test_folder.added_to_bucket: @@ -125,7 +134,7 @@ class BucketHolder: if not_measured_tests: print(f"Found {len(not_measured_tests)} not measured test files: ") for test in sorted(not_measured_tests, key=lambda x: x.path): - print(f"- {test.path}") + print(f" - {test.path}") def create_ouput_file(self) -> None: """Create output file."""