Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_winconsoleio.cpython-311.opt-2.pyc |
�
�KeG � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZ ej dk r ej d� � �d dl m
Z
e j Z G d� dej
� � Zedk r ej � � dS dS ) � N)� os_helper�win32ztest 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�
issubclass�ConIO�io� RawIOBase�assertFalse�BufferedIOBase�
TextIOBase��selfs �@/usr/local/apps/python3/lib/python3.11/test/test_winconsoleio.py�test_abczWindowsConsoleIOTests.test_abc sg � ����
�5�"�,�7�7�8�8�8�����E�2�+<�=�=�>�>�>�����E�2�=�9�9�:�:�:�:�:� 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 descriptor���z&Cannot open (console|non-console file)r � �w� )�assertRaisesRegex�
ValueErrorr �tempfile�
TemporaryFile�filenor �readabler �writable�assertEqual�close)r �tmpfile�fd�fs 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�
��a���A�
�O�O�A�J�J�L�L�)�)�)����Q�Z�Z�\�\�*�*�*����Q����
�
�+�+�+�
�G�G�I�I�I�
�G�G�I�I�I�I�� � � � ��D� ����
��a��
�
�A�
���Q�Z�Z�\�\�*�*�*��O�O�A�J�J�L�L�)�)�)����Q����
�
�+�+�+�
�G�G�I�I�I�
�G�G�I�I�I�I�� � � � ��D� ����
��a��
�
�A�
���Q�Z�Z�\�\�*�*�*��O�O�A�J�J�L�L�)�)�)����Q����
�
�+�+�+�
�G�G�I�I�I�
�G�G�I�I�I�I�I�� � � � ��D�D� ���sG �7A9�9A=� A=�D3 �3
E �?E �G3 �3
H �?H �J4 �4
K�Kc �* � | � t t t j � � t d� � }| � |� � � � � | � |� � � � � | � |�
� � � � |� � � |� � � t d� � }| � |� � � � � | � |� � � � � | � |�
� � � � |� � � |� � � t dd� � }| � |� � � � � | � |� � � � � | � |�
� � � � |� � � |� � � t j � � d d� dk rCt ddd �
� � }| � |t � � |� � � d S d S )N�CON�CONIN$�CONOUT$r � ��
r i�U zC:/con�rbr �� buffering)�assertRaisesr r �sys�
executabler r r r! �assertIsNotNoner r# �getwindowsversion�open�assertIsInstance�r r&