From 6a2d0df8a7cf3bcd460310c8a2dd714ae6e13182 Mon Sep 17 00:00:00 2001 From: Olivier Philippon Date: Fri, 27 May 2022 15:57:55 +0100 Subject: [PATCH] [AppTest] hotfix for the "css" branch after commit d45b0448880 --- tests/utilities/test_app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/utilities/test_app.py b/tests/utilities/test_app.py index 98dc8ea7c..9a5b38073 100644 --- a/tests/utilities/test_app.py +++ b/tests/utilities/test_app.py @@ -12,10 +12,10 @@ from unittest import mock from rich.console import Console from textual import events, errors +from textual._ansi_sequences import SYNC_START from textual._clock import _Clock from textual.app import WINDOWS from textual._context import active_app -from textual._ansi_sequences import TERMINAL_MODES_ANSI_SEQUENCES from textual.app import App, ComposeResult from textual.driver import Driver from textual.geometry import Size, Region @@ -23,8 +23,6 @@ from textual.geometry import Size, Region # N.B. These classes would better be named TestApp/TestConsole/TestDriver/etc, # but it makes pytest emit warning as it will try to collect them as classes containing test cases :-/ -_SYNC_START_SEQUENCE = TERMINAL_MODES_ANSI_SEQUENCES["sync_start"] - class AppTest(App): def __init__( @@ -192,7 +190,7 @@ class AppTest(App): total_capture = self.total_capture if not total_capture: return None - screen_captures = total_capture.split(_SYNC_START_SEQUENCE) + screen_captures = total_capture.split(SYNC_START) for single_screen_capture in reversed(screen_captures): if len(single_screen_capture) > 30: # let's return the last occurrence of a screen that seem to be properly "fully-paint"