diff options
| author | Kirill Podoprigora <kirill.bast9@mail.ru> | 2024-01-25 20:00:52 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-25 20:00:52 (GMT) |
| commit | 33ae9895d4ac0d88447e529038bc4725ddd8c291 (patch) | |
| tree | ee0e40b06a12fa620ad65456e7e67d5a07e8e505 | |
| parent | d96358ff9de646dbf64dfdfed46d510da7ec4803 (diff) | |
| download | cpython-33ae9895d4ac0d88447e529038bc4725ddd8c291.zip cpython-33ae9895d4ac0d88447e529038bc4725ddd8c291.tar.gz cpython-33ae9895d4ac0d88447e529038bc4725ddd8c291.tar.bz2 | |
gh-114561: Mark some tests in ``test_wincosoleio`` with `requires_resource('console')` decorator (GH-114565)
| -rw-r--r-- | Lib/test/test_winconsoleio.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_winconsoleio.py b/Lib/test/test_winconsoleio.py index 72ff960..209e446 100644 --- a/Lib/test/test_winconsoleio.py +++ b/Lib/test/test_winconsoleio.py @@ -6,7 +6,7 @@ import os import sys import tempfile import unittest -from test.support import os_helper +from test.support import os_helper, requires_resource if sys.platform != 'win32': raise unittest.SkipTest("test only relevant on win32") @@ -150,6 +150,7 @@ class WindowsConsoleIOTests(unittest.TestCase): sys.stdin = old_stdin self.assertEqual(actual, text) + @requires_resource('console') def test_input(self): # ASCII self.assertStdinRoundTrip('abc123') @@ -164,6 +165,7 @@ class WindowsConsoleIOTests(unittest.TestCase): # Non-BMP self.assertStdinRoundTrip('\U00100000\U0010ffff\U0010fffd') + @requires_resource('console') def test_partial_reads(self): # Test that reading less than 1 full character works when stdin # contains multibyte UTF-8 sequences @@ -199,6 +201,7 @@ class WindowsConsoleIOTests(unittest.TestCase): self.assertEqual(actual, expected, 'stdin.read({})'.format(read_count)) + @requires_resource('console') def test_ctrl_z(self): with open('CONIN$', 'rb', buffering=0) as stdin: source = '\xC4\x1A\r\n'.encode('utf-16-le') |
