python (3.12.0)
ΑeG d dl Z d dlZd dlZd dlZd dlZd dlmZ ej dk7 r ej d d dl m
Z
e j Z G d dej Zedk( r ej yy) N) os_helperwin32ztest only relevant on win32)write_inputc e Zd Zd Zd Zd Z ej ej dd dk d d Z
d Zd
Zd Z
d Z ej d
d d Zd Z ej d
d d Zd Zy)WindowsConsoleIOTestsc | j t t t j | j t t t j | j t t t j y )N)
assertTrue
issubclassConIOio RawIOBaseassertFalseBufferedIOBase
TextIOBaseselfs J/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_winconsoleio.pytest_abczWindowsConsoleIOTests.test_abc sM
5",,78E2+<+<=>E2==9: c | j t dt d t j 5 }|j }| j t dt | d d d t d }| j
|j | j |j | j d|j |j |j t dd }| j |j | j
|j | j d|j |j |j t dd }| j |j | j
|j | j d|j |j |j y # 1 sw Y xY w# t $ r Y 0w xY w# t $ r Y w xY w# t $ r Y y w xY w)Nznegative file descriptorz&Cannot open (console|non-console file)r w )assertRaisesRegex
ValueErrorr tempfile
TemporaryFilefilenor readabler writableassertEqualclose)r tmpfilefdfs r test_open_fdz"WindowsConsoleIOTests.test_open_fd s z&r 3
#
#
% E!B
"":8%
E E
aA
OOAJJL)QZZ\*Q
+
GGI
GGI
a
A
QZZ\*OOAJJL)Q
+
GGI
GGI
a
A
QZZ\*OOAJJL)Q
+
GGI
GGIS E E sA -H'H 1H$ <H3 H H! H!$ H0/H03 H?>H?c & | j t t t j t d }| j |j
| j |j | j |j |j |j t d }| j |j
| j |j | j |j |j |j t dd }| j |j
| j |j | j |j |j |j t j d d dk r5t ddd
}| j |t |j y y )NCONCONIN$CONOUT$r
r iU zC:/conrbr buffering)assertRaisesr r sys
executabler r r r! assertIsNotNoner r# getwindowsversionopenassertIsInstancer r&