@@ -2418,7 +2418,7 @@ def render(self) -> LinearGradient:
2418
2418
return LinearGradient (30.0 , stops )
2419
2419
2420
2420
app = TransparentApp ()
2421
- snap_compare (app )
2421
+ assert snap_compare (app )
2422
2422
2423
2423
2424
2424
def test_maximize_allow (snap_compare ):
@@ -2888,7 +2888,7 @@ async def run_before(pilot: Pilot) -> None:
2888
2888
await pilot .pause ()
2889
2889
await pilot .click ("Select" )
2890
2890
2891
- snap_compare (TallSelectApp (), run_before = run_before )
2891
+ assert snap_compare (TallSelectApp (), run_before = run_before )
2892
2892
2893
2893
2894
2894
def test_markup_command_list (snap_compare ):
@@ -2908,7 +2908,7 @@ def on_mount(self) -> None:
2908
2908
]
2909
2909
)
2910
2910
2911
- snap_compare (MyApp ())
2911
+ assert snap_compare (MyApp ())
2912
2912
2913
2913
2914
2914
def test_app_resize_order (snap_compare ):
@@ -2950,7 +2950,7 @@ def on_mount(self) -> None:
2950
2950
def on_resize (self ) -> None :
2951
2951
self .add_class ("narrow" )
2952
2952
2953
- snap_compare (SCApp ())
2953
+ assert snap_compare (SCApp ())
2954
2954
2955
2955
2956
2956
def test_add_remove_tabs (snap_compare ):
@@ -2981,7 +2981,7 @@ def action_add_pane(self) -> None:
2981
2981
new_pane = TabPane ("New tab" , Label ("new" ))
2982
2982
tabbed_content .add_pane (new_pane )
2983
2983
2984
- snap_compare (ExampleApp (), press = ["a" , "r" , "a" ])
2984
+ assert snap_compare (ExampleApp (), press = ["a" , "r" , "a" ])
2985
2985
2986
2986
2987
2987
def test_click_expand (snap_compare ):
@@ -2998,7 +2998,7 @@ async def run_before(pilot: Pilot) -> None:
2998
2998
await pilot .pause ()
2999
2999
await pilot .click (Select )
3000
3000
3001
- snap_compare (SelectApp (), run_before = run_before )
3001
+ assert snap_compare (SelectApp (), run_before = run_before )
3002
3002
3003
3003
3004
3004
def test_disable_command_palette (snap_compare ):
@@ -3019,7 +3019,7 @@ def check_action(
3019
3019
return None
3020
3020
return True
3021
3021
3022
- snap_compare (FooterApp ())
3022
+ assert snap_compare (FooterApp ())
3023
3023
3024
3024
3025
3025
def test_selection_list_wrap (snap_compare ):
@@ -3029,7 +3029,7 @@ class SelectionListApp(App):
3029
3029
def compose (self ) -> ComposeResult :
3030
3030
yield SelectionList (("Hello World " * 100 , 0 ))
3031
3031
3032
- snap_compare (SelectionListApp ())
3032
+ assert snap_compare (SelectionListApp ())
3033
3033
3034
3034
3035
3035
def test_border_tab (snap_compare ):
@@ -3054,7 +3054,7 @@ def compose(self) -> ComposeResult:
3054
3054
label .border_subtitle = ":-)"
3055
3055
yield label
3056
3056
3057
- snap_compare (TabApp ())
3057
+ assert snap_compare (TabApp ())
3058
3058
3059
3059
3060
3060
def test_dock_align (snap_compare ):
@@ -3126,7 +3126,7 @@ class Test1(App):
3126
3126
def compose (self ):
3127
3127
yield MainContainer ()
3128
3128
3129
- snap_compare (Test1 ())
3129
+ assert snap_compare (Test1 ())
3130
3130
3131
3131
3132
3132
def test_auto_parent_with_alignment (snap_compare ):
@@ -3163,7 +3163,7 @@ class FloatSidebarApp(App):
3163
3163
def compose (self ) -> ComposeResult :
3164
3164
yield Sidebar ()
3165
3165
3166
- snap_compare (FloatSidebarApp ())
3166
+ assert snap_compare (FloatSidebarApp ())
3167
3167
3168
3168
3169
3169
def test_select_refocus (snap_compare ):
@@ -3207,7 +3207,7 @@ def compose(self):
3207
3207
with Container ():
3208
3208
yield MyListView ()
3209
3209
3210
- snap_compare (TUI (), press = ["down" , "enter" , "down" , "down" , "enter" ])
3210
+ assert snap_compare (TUI (), press = ["down" , "enter" , "down" , "down" , "enter" ])
3211
3211
3212
3212
3213
3213
def test_widgets_in_grid (snap_compare ):
@@ -3243,7 +3243,7 @@ def compose(self) -> ComposeResult:
3243
3243
label .border_title = str (n )
3244
3244
yield label
3245
3245
3246
- snap_compare (MyApp (), terminal_size = (100 , 50 ))
3246
+ assert snap_compare (MyApp (), terminal_size = (100 , 50 ))
3247
3247
3248
3248
3249
3249
def test_arbitrary_selection (snap_compare ):
@@ -3296,7 +3296,7 @@ def on_mount(self) -> None:
3296
3296
for number in range (1 , 100 ):
3297
3297
t1 .add_row (str (number ) + " " * 200 )
3298
3298
3299
- snap_compare (MyApp ())
3299
+ assert snap_compare (MyApp ())
3300
3300
3301
3301
3302
3302
def test_scrollbar_background_with_opacity (snap_compare ):
@@ -3342,7 +3342,7 @@ def compose(self) -> ComposeResult:
3342
3342
yield Label ("This allows [bold]markup[/bold]" )
3343
3343
yield Label ("This does not allow [bold]markup[/bold]" , markup = False )
3344
3344
3345
- snap_compare (LabelApp ())
3345
+ assert snap_compare (LabelApp ())
3346
3346
3347
3347
3348
3348
def test_arbitrary_selection_double_cell (snap_compare ):
@@ -3447,7 +3447,7 @@ class OptionListAutoCrash(App[None]):
3447
3447
def compose (self ) -> ComposeResult :
3448
3448
yield OptionList ()
3449
3449
3450
- snap_compare (OptionListAutoCrash ())
3450
+ assert snap_compare (OptionListAutoCrash ())
3451
3451
3452
3452
3453
3453
def test_focus_within_transparent (snap_compare ):
@@ -3491,7 +3491,7 @@ def compose(self) -> ComposeResult:
3491
3491
yield OptionList (* ["This is an option" for _ in range (30 )])
3492
3492
yield Input (placeholder = "Escape out via here for the bug" )
3493
3493
3494
- snap_compare (FocusWithinTransparentApp (), press = ["tab" ])
3494
+ assert snap_compare (FocusWithinTransparentApp (), press = ["tab" ])
3495
3495
3496
3496
3497
3497
def test_option_list_wrapping (snap_compare ):
@@ -3511,7 +3511,7 @@ def compose(self) -> ComposeResult:
3511
3511
"This is a very long option that is too wide to fit within the space provided and will overflow."
3512
3512
)
3513
3513
3514
- snap_compare (OLApp ())
3514
+ assert snap_compare (OLApp ())
3515
3515
3516
3516
3517
3517
def test_add_separator (snap_compare ):
@@ -3549,7 +3549,7 @@ async def run_before(pilot: Pilot) -> None:
3549
3549
await pilot .click (Button )
3550
3550
await pilot .pause (0.4 )
3551
3551
3552
- snap_compare (FocusTest (), run_before = run_before )
3552
+ assert snap_compare (FocusTest (), run_before = run_before )
3553
3553
3554
3554
3555
3555
def test_visual_tooltip (snap_compare ):
@@ -3576,4 +3576,4 @@ async def run_before(pilot: Pilot) -> None:
3576
3576
await pilot .pause (0.4 )
3577
3577
await pilot .pause ()
3578
3578
3579
- snap_compare (TooltipApp (), run_before = run_before )
3579
+ assert snap_compare (TooltipApp (), run_before = run_before )
0 commit comments