Skip to content

Commit 16268d7

Browse files
committed
update tests
1 parent acc9560 commit 16268d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Lib/test/test_winapi.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pathlib
66
import re
77
import unittest
8-
from test.support import import_helper, os_helper
8+
from test.support import import_helper, os_helper, requires_resource
99

1010
_winapi = import_helper.import_module('_winapi', required_on=['win'])
1111

@@ -178,12 +178,13 @@ def test_console_mode_non_console_handle(self):
178178
with self.assertRaises(OSError):
179179
_winapi.FlushConsoleInputBuffer(rfd)
180180

181+
@requires_resource('console')
181182
def test_console_mode(self):
182183
try:
183184
handle = _winapi.CreateFile(
184185
"CONIN$",
185186
_winapi.GENERIC_READ | _winapi.GENERIC_WRITE,
186-
3, # 3=FILE_SHARE_READ|FILE_SHARE_WRITE
187+
3, # 3=FILE_SHARE_READ|FILE_SHARE_WRITE
187188
_winapi.NULL,
188189
_winapi.OPEN_EXISTING,
189190
0,

0 commit comments

Comments
 (0)