squirrel-battle/squirrelbattle/tests/screen.py

27 lines
694 B
Python
Raw Permalink Normal View History

2020-11-27 15:33:17 +00:00
# Copyright (C) 2020 by ÿnérant, eichhornchen, nicomarg, charlse
# SPDX-License-Identifier: GPL-3.0-or-later
2020-11-26 21:32:25 +00:00
from typing import Tuple
2020-11-08 22:40:03 +00:00
class FakePad:
"""
In order to run tests, we simulate a fake curses pad that accepts functions
but does nothing with them.
"""
def addstr(self, y: int, x: int, message: str, color: int = 0) -> None:
2020-11-08 22:40:03 +00:00
pass
def refresh(self, pminrow: int, pmincol: int, sminrow: int,
smincol: int, smaxrow: int, smaxcol: int) -> None:
pass
2020-11-26 21:32:25 +00:00
def erase(self) -> None:
2020-11-08 22:40:03 +00:00
pass
def resize(self, height: int, width: int) -> None:
pass
2020-11-26 21:32:25 +00:00
def getmaxyx(self) -> Tuple[int, int]:
return 42, 42