We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ce5e07 commit 63c9a6cCopy full SHA for 63c9a6c
Lib/test/test_winconsoleio.py
@@ -92,9 +92,11 @@ def test_open_name(self):
92
f.close()
93
94
95
- f = open('C:/con', 'rb', buffering=0)
96
- self.assertIsInstance(f, ConIO)
97
- f.close()
+ # bpo-45354: Windows 11 changed MS-DOS device name handling
+ if sys.getwindowsversion()[:3] < (10, 0, 22000):
+ f = open('C:/con', 'rb', buffering=0)
98
+ self.assertIsInstance(f, ConIO)
99
+ f.close()
100
101
@unittest.skipIf(sys.getwindowsversion()[:2] <= (6, 1),
102
"test does not work on Windows 7 and earlier")
@@ -114,7 +116,8 @@ def test_conout_path(self):
114
116
conout_path = os.path.join(temp_path, 'CONOUT$')
115
117
118
with open(conout_path, 'wb', buffering=0) as f:
- if sys.getwindowsversion()[:2] > (6, 1):
119
120
+ if (6, 1) < sys.getwindowsversion()[:3] < (10, 0, 22000):
121
self.assertIsInstance(f, ConIO)
122
else:
123
self.assertNotIsInstance(f, ConIO)
0 commit comments