Skip to content

Commit 7d08e0a

Browse files
committed
Fixing test module on non-Windows platforms
1 parent 97d05f5 commit 7d08e0a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/test_win32_console.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
SCREEN_HEIGHT = 30
2020
DEFAULT_STYLE_ATTRIBUTE = 16
2121

22+
@dataclasses.dataclass
23+
class StubScreenBufferInfo:
24+
dwCursorPosition: COORD = COORD(CURSOR_X, CURSOR_Y)
25+
dwSize: COORD = COORD(SCREEN_WIDTH, SCREEN_HEIGHT)
26+
wAttributes: int = DEFAULT_STYLE_ATTRIBUTE
27+
2228
except ImportError:
2329
pass
2430

@@ -31,13 +37,6 @@ def test_windows_coordinates_to_ctype():
3137
assert coord.Y == 1
3238

3339

34-
@dataclasses.dataclass
35-
class StubScreenBufferInfo:
36-
dwCursorPosition: COORD = COORD(CURSOR_X, CURSOR_Y)
37-
dwSize: COORD = COORD(SCREEN_WIDTH, SCREEN_HEIGHT)
38-
wAttributes: int = DEFAULT_STYLE_ATTRIBUTE
39-
40-
4140
@pytest.fixture
4241
def win32_handle():
4342
handle = mock.sentinel

0 commit comments

Comments
 (0)