Skip to content

Commit 6a27fed

Browse files
committed
test: make this test fail more clearly
1 parent 8e552cd commit 6a27fed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_testing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,5 +481,9 @@ def test_all_our_source_files() -> None:
481481
for i, (source_file, source) in enumerate(all_our_source_files(), start=1):
482482
has_toves = (source_file.name == "test_testing.py") # fmt: skip
483483
assert (("# Twas brillig " + "and the slithy toves") in source) == has_toves
484-
assert len(source) > 190 # tests/__init__.py is shortest at 196
485-
assert 100 < i < 140 # currently 117 files
484+
# tests/__init__.py is shortest at 196
485+
assert len(source) > 190, (
486+
f"{source_file} is shorter ({len(source)} bytes) than the expected smallest file"
487+
)
488+
# currently 119 files
489+
assert 100 < i < 140, f"Expected about 118 source files, got {i}"

0 commit comments

Comments
 (0)