Skip to content

Commit 1442a96

Browse files
authored
Merge pull request #5731 from TomJGooding/test-fix-missing-assert-in-snapshot-tests
test: fix missing assert in snapshot tests
2 parents 3b8713b + c6d5f9a commit 1442a96

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/snapshot_tests/test_snapshots.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3842,7 +3842,7 @@ def compose(self) -> ComposeResult:
38423842
yield CustomWidget()
38433843
yield Footer()
38443844

3845-
snap_compare(MyApp())
3845+
assert snap_compare(MyApp())
38463846

38473847

38483848
def test_enforce_visual(snap_compare):
@@ -3873,7 +3873,7 @@ class OptionListOverflowApp(App[None]):
38733873
def compose(self) -> ComposeResult:
38743874
yield OptionList(*[OverflowOption() for _ in range(100)])
38753875

3876-
snap_compare(OptionListOverflowApp())
3876+
assert snap_compare(OptionListOverflowApp())
38773877

38783878

38793879
def test_notifications_markup(snap_compare):
@@ -3892,7 +3892,7 @@ def on_mount(self) -> None:
38923892
timeout=100,
38933893
)
38943894

3895-
snap_compare(ToastApp())
3895+
assert snap_compare(ToastApp())
38963896

38973897
def test_option_list_size_when_options_removed(snap_compare):
38983898
"""Regression test for https://github.com/Textualize/textual/issues/5728
@@ -3935,7 +3935,6 @@ def action_clear_options(self) -> None:
39353935

39363936
assert snap_compare(OptionListApp(), press=["x"])
39373937

3938-
# Thanks Tom Gooding
39393938
def test_alignment_with_auto_and_min_height(snap_compare):
39403939
"""Regression test for https://github.com/Textualize/textual/issues/5608
39413940
You should see a blue label that is centered both horizontally and vertically
@@ -3962,4 +3961,4 @@ def compose(self) -> ComposeResult:
39623961
with Container():
39633962
yield Label("centered")
39643963

3965-
snap_compare(AlignmentApp())
3964+
assert snap_compare(AlignmentApp())

0 commit comments

Comments
 (0)