python (3.11.7)
    eG                         d Z ddlZddlZddlZddlZddlZddlmZ ej        dk    r ej	        d          ddl
mZ ej        Z
 G d dej                  Zed	k    r ej                     dS dS )
zTests for WindowsConsoleIO
    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 ZdS )WindowsConsoleIOTestsc                 2   |                      t          t          t          j                             |                     t          t          t          j                             |                     t          t          t          j                             d S )N)
assertTrue
issubclassConIOio	RawIOBaseassertFalseBufferedIOBase
TextIOBaseselfs    J/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_winconsoleio.pytest_abczWindowsConsoleIOTests.test_abc   sg    
5",77888E2+<==>>>E2=99:::::    c                    |                      t          dt          d           t          j                    5 }|                                }|                      t          dt          |           d d d            n# 1 swxY w Y   	 t          d          }|                     |                                           |                     |	                                           | 
                    d|                                           |                                 |                                 n# t          $ r Y nw xY w	 t          dd          }|                     |                                           |                     |	                                           | 
                    d|                                           |                                 |                                 n# t          $ r Y nw xY w	 t          dd          }|                     |                                           |                     |	                                           | 
                    d|                                           |                                 |                                 d S # t          $ r Y d S 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 	3 	3 
#
%
% 	E!!B 
"":8%
E 
E 
E		E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E
	aA
 
OOAJJLL)))QZZ\\***Q
+++
GGIII
GGIIII  	 	 	D	
	a
A
 
QZZ\\***OOAJJLL)))Q
+++
GGIII
GGIIII  	 	 	D	
	a
A
 
QZZ\\***OOAJJLL)))Q
+++
GGIII
GGIIIII  	 	 	DD	sG   7A99A= A=D3 3
E ?E G3 3
H ?H J4 4
KKc                 *   |                      t          t          t          j                   t          d          }|                     |                                           |                     |                                           | 	                    |
                                           |                                 |                                 t          d          }|                     |                                           |                     |                                           | 	                    |
                                           |                                 |                                 t          dd          }|                     |                                           |                     |                                           | 	                    |
                                           |                                 |                                 t          j                    d d         dk     rCt          ddd	
          }|                     |t                     |                                 d S d S )NCONCONIN$CONOUT$r      
   r   iU  zC:/conrbr   	buffering)assertRaisesr   r   sys
executabler	   r    r   r!   assertIsNotNoner   r#   getwindowsversionopenassertIsInstancer   r&