mirror of https://github.com/Textualize/rich.git
Fixing test module on non-Windows platforms
This commit is contained in:
parent
97d05f592a
commit
7d08e0a7cd
|
@ -19,6 +19,12 @@ try:
|
|||
SCREEN_HEIGHT = 30
|
||||
DEFAULT_STYLE_ATTRIBUTE = 16
|
||||
|
||||
@dataclasses.dataclass
|
||||
class StubScreenBufferInfo:
|
||||
dwCursorPosition: COORD = COORD(CURSOR_X, CURSOR_Y)
|
||||
dwSize: COORD = COORD(SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
wAttributes: int = DEFAULT_STYLE_ATTRIBUTE
|
||||
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
@ -31,13 +37,6 @@ def test_windows_coordinates_to_ctype():
|
|||
assert coord.Y == 1
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class StubScreenBufferInfo:
|
||||
dwCursorPosition: COORD = COORD(CURSOR_X, CURSOR_Y)
|
||||
dwSize: COORD = COORD(SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
wAttributes: int = DEFAULT_STYLE_ATTRIBUTE
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def win32_handle():
|
||||
handle = mock.sentinel
|
||||
|
|
Loading…
Reference in New Issue