2021-01-10 09:46:17 +00:00
|
|
|
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
2020-11-27 15:33:17 +00:00
|
|
|
# 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.
|
|
|
|
"""
|
2020-11-10 21:30:55 +00:00
|
|
|
def addstr(self, y: int, x: int, message: str, color: int = 0) -> None:
|
2020-11-08 22:40:03 +00:00
|
|
|
pass
|
|
|
|
|
2020-12-18 15:40:52 +00:00
|
|
|
def noutrefresh(self, pminrow: int, pmincol: int, sminrow: int,
|
|
|
|
smincol: int, smaxrow: int, smaxcol: int) -> None:
|
2020-11-08 22:40:03 +00:00
|
|
|
pass
|
|
|
|
|
2020-11-26 21:32:25 +00:00
|
|
|
def erase(self) -> None:
|
2020-11-08 22:40:03 +00:00
|
|
|
pass
|
2020-11-08 23:44:08 +00:00
|
|
|
|
|
|
|
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
|
2020-12-18 22:39:56 +00:00
|
|
|
|
2020-12-31 14:00:20 +00:00
|
|
|
def inch(self, y: int, x: int) -> str:
|
2020-12-18 22:39:56 +00:00
|
|
|
return "i"
|