https://github.com/python/cpython/commit/4ff2d2926652bc380e89c99cb1ffc57b3b6d412d
commit: 4ff2d2926652bc380e89c99cb1ffc57b3b6d412d
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: zooba <[email protected]>
date: 2024-01-25T20:18:23Z
summary:
gh-114561: Mark some tests in `test_wincosoleio` with
`requires_resource('console')` decorator (GH-114565)
(cherry picked from commit 33ae9895d4ac0d88447e529038bc4725ddd8c291)
Co-authored-by: Kirill Podoprigora <[email protected]>
files:
M Lib/test/test_winconsoleio.py
diff --git a/Lib/test/test_winconsoleio.py b/Lib/test/test_winconsoleio.py
index 70a85552cc03b0..cf8b105823b262 100644
--- a/Lib/test/test_winconsoleio.py
+++ b/Lib/test/test_winconsoleio.py
@@ -6,7 +6,7 @@
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")
@@ -140,6 +140,7 @@ def assertStdinRoundTrip(self, text):
sys.stdin = old_stdin
self.assertEqual(actual, text)
+ @requires_resource('console')
def test_input(self):
# ASCII
self.assertStdinRoundTrip('abc123')
@@ -154,6 +155,7 @@ def test_input_nonbmp(self):
# 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
@@ -189,6 +191,7 @@ def test_partial_surrogate_reads(self):
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')
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]