mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Improve printing
This commit is contained in:
parent
16c56d9f6b
commit
7d2818d882
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user