pass size as a parameter

This commit is contained in:
Will McGugan
2022-10-29 21:09:16 +01:00
parent 2092d42bbf
commit c5b2e6982e
7 changed files with 54 additions and 20 deletions

View File

@@ -41,7 +41,7 @@ def snap_compare(
def compare(
app_path: str,
press: Iterable[str] = ("_",),
terminal_size: tuple[int, int] = (24, 80),
terminal_size: tuple[int, int] = (80, 24),
) -> bool:
"""
Compare a current screenshot of the app running at app_path, with
@@ -52,7 +52,7 @@ def snap_compare(
Args:
app_path (str): The path of the app.
press (Iterable[str]): Key presses to run before taking screenshot. "_" is a short pause.
terminal_size (tuple[int, int]): A pair of integers (rows, columns), representing terminal size.
terminal_size (tuple[int, int]): A pair of integers (WIDTH, SIZE), representing terminal size.
Returns:
bool: True if the screenshot matches the snapshot.