2021-01-10 10:46:17 +01:00
|
|
|
# Copyright (C) 2020-2021 by ÿnérant, eichhornchen, nicomarg, charlse
|
2020-11-27 16:33:17 +01:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2020-11-26 22:32:25 +01:00
|
|
|
from typing import Tuple
|
|
|
|
|
|
|
|
|
2020-11-08 23:40:03 +01: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 22:30:55 +01:00
|
|
|
def addstr(self, y: int, x: int, message: str, color: int = 0) -> None:
|
2020-11-08 23:40:03 +01:00
|
|
|
pass
|
|
|
|
|
2020-12-18 16:40:52 +01:00
|
|
|
def noutrefresh(self, pminrow: int, pmincol: int, sminrow: int,
|
|
|
|
smincol: int, smaxrow: int, smaxcol: int) -> None:
|
2020-11-08 23:40:03 +01:00
|
|
|
pass
|
|
|
|
|
2020-11-26 22:32:25 +01:00
|
|
|
def erase(self) -> None:
|
2020-11-08 23:40:03 +01:00
|
|
|
pass
|
2020-11-09 00:44:08 +01:00
|
|
|
|
|
|
|
def resize(self, height: int, width: int) -> None:
|
|
|
|
pass
|
2020-11-26 22:32:25 +01:00
|
|
|
|
|
|
|
def getmaxyx(self) -> Tuple[int, int]:
|
|
|
|
return 42, 42
|
2020-12-18 23:39:56 +01:00
|
|
|
|
2020-12-31 15:00:20 +01:00
|
|
|
def inch(self, y: int, x: int) -> str:
|
2020-12-18 23:39:56 +01:00
|
|
|
return "i"
|