403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_io/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_io/__pycache__/test_general.cpython-315.opt-1.pyc
R
>lqj]�c�F�Qs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]PH,s]QH0G
s
]QH8GsGsGs]QHHGsGsGsGsGs]QH`Gs]QHhGsGsGs]PHxs]PH|s QQ2s!QQ	\!\2s"\
OFQ
Q\	OH22s%QQ
\!\2s&\
OFQQ\	OH22s'QQ2s(QQ\(\2s)QQ\(\2s*QQ\	OH2s+\,Q6Xc\	OZ2P!P!)zhGeneral tests for the io module.

New tests should go in more specific modules; see test_io/__init__.py
)�support)�assert_python_ok�assert_python_failure�run_python_until_end)�
import_helper�is_apple�	os_helper�threading_helper�warnings_helper)�FakePath)�	byteslike�	CTestCase�
PyTestCasec��`�\sQs]snQsQsQsQ8QksQ9sQs	Qs
\OQ2s
\O\\Q2Q	2Q
2sQsQsQ
sQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Qs#Qs$Qs%Qs&Qs'Q s(Q!s)Q"s*Q#s+Q$s,Q%s-Q&s.Q's/Q(s0Q)s1Q*s2Q+s3Q,s4Q-s5Q.s6Q/s7Q0s8Q1s9Q2s:Q3s;Q4s<Q5s=\>O~2Q62s@Q7sAUsBP!):�IOTestc�P�[O[O2P!�N�r�unlink�TESTFN��selfs&�.C:\Python315\\Lib\test\test_io\test_general.py�setUp�IOTest.setUp �������)�)�*�c�P�[O[O2P!rrrs&r�tearDown�IOTest.tearDown#rrc��UOUOQ2]2UO]2UOUO2]2UO	]2UOUOQ2]2UOUO	]2]2UOUOQ2]2UOUO2]2UOUO	P]2]2UOUO2]2[Q2oUOUOU2]	2QUQ$UOUO	]2]2UOUOQ2]2UOUO	P]2]
2UOUO2]
2UOUO]2]2UOUO2]
2UO
[UOQ2P!)sblah.sHello.s	 world


�NNN�h�s	*********)�assertEqual�write�truncate�tell�seek�	bytearray�assertRaises�	TypeError)r�f�buffers&& r�	write_ops�IOTest.write_ops&s����������*�A�.�	�
�
�1�
��������1�%�	���q�	��������*�A�.���������A�&��������+�Q�/��������1�%��������A���*��������1�%��?�+����������!�,���q�	���������A�&����������*��������A���+��������2�&�������B���,��������2�&����)�Q�V�V�S�1rc��UO]2oUOUQ2[U2oUOUOU2]2UO[	U2Q2[]2oUOUOU2]2UO[
U2]2UOUQ*Q2UOUO]2]2UOUO]2Q2UOUO]2Q2UOUO[Q22]2UOUOQ]2]2UOUO]2Q2UOUO]2Q2UOUO[22]2UOUOQ]2]2UOUO]2Q2UOUO2]
2UO[UOQ	2U%c�UO]2UOUO2Q2UO]2UOUO2Q
2UOUO2Q2UO]2[]2oUOUOU2]2UO[	U2Q2P!P!)�shellos worl:N�Nsd
�hello world
r�xsworldr"sworld
i����)�readr#r�readinto�bytesr(�lenr'r&r)r*�	readinto1)rr+�buffered�datas&&& r�read_ops�IOTest.read_ops>sj���v�v�a�y������x�(�����������D�)�1�-�����t��h�/���|��������D�)�1�-�����T��A�&�����b��6�*���������A�&���������%5�6���������C�(�������I�d�O�4�a�8��������A���*���������H�-���������C�(�������I�K�0�!�4��������A���*���������H�-��������2�&����)�Q�V�V�S�1��
�F�F�1�I����Q�V�V�X�'7�8�
�F�F�1�I����Q�V�V�X�z�2����Q�V�V�X�s�+�
�F�F�1�I��Q�<�D����Q�[�[��.��2����U�4�[�(�3�rc�6�UOUOUO2UO2UOUO
2UO2UOUOQ2]2UOUO
2UO]*2UOUOP]2UO]*2UOUO2UO]*2UOUO
2UO]*2UOUO]]2UO]*2UOUOUO]*2UO]*2UOUO
2UO]*2UOUO]]2UO]*2UOUOP]2UO2UOUO]2Q2P![[1cSOQ2CK_h9h)zno largefile support�xxxr3)
r#r'�LARGE�
OverflowError�
ValueError�skipTestr&r$r%r4�rr+s&&r�large_file_ops�IOTest.large_file_opsas���	2����Q�V�V�D�J�J�/����<�	
�������4�:�:�.���������!�,��������4�:�:��>�2��������A���
�
�Q��7��������t�z�z�A�~�6��������4�:�:��>�2��������1��t�z�z�A�~�6�������D�J�J��N�3�T�Z�Z�!�^�D��������4�:�:��>�2��������1��t�z�z�A�~�6��������A���
�
�3���������D�)���z�*�	2��M�M�0�1�	2�s�5I2�2J�J�Jc���UOoUO[OQQQ59^tt^2oUO	VO
2UO	VO2PPP2UO[OQ29^tt^2oUO	VO
2UO	VO2PPP2UO[OQ]Q59^tt^2oUO	VO
2UO	VO2UO	VO2PPP2UO[OQ]Q59^tt^2oUO	VOQ2UO	VOQ,2PPP2UO[OQ29^tt^2oUO	VOQ2UO	VOQ,2PPP2UO[OQQQ59^tt^2oUO	VOQ	2UO	VOQ
,2UO	VO]UO2UO	VOPUO2PPP2P!)%fhCK�9h)%fhCK;9h)%fhCK�9h)%fhCKs9h)%fhCK9h)%fhP!9h)�w�utf-8��encoding�wb��	buffering�rbsblahsblah
�r�blahzblah
)
�UnsupportedOperation�openrrr)r4�readline�readallr$�
writelinesr'�SEEK_CUR�SEEK_END)r�exc�fps&  r�test_invalid_operations�IOTest.test_invalid_operationsusZ���'�'��
�Y�Y�y�'�'��w�Y�
?�
?�2����c�7�7�+����c�;�;�/�@��Y�Y�y�'�'��
.�
.�"����c�7�7�+����c�;�;�/�/��Y�Y�y�'�'���Y�
;�
;�r����c�7�7�+����c�:�:�.����c�;�;�/�<��Y�Y�y�'�'���Y�
;�
;�r����c�8�8�W�5����c�=�=�9�+�>�<��Y�Y�y�'�'��
.�
.�"����c�8�8�W�5����c�=�=�9�+�>�/��Y�Y�y�'�'��w�Y�
?�
?�2����c�8�8�V�4����c�=�=�8�*�=����c�7�7�A�t�}�}�=����c�7�7�B��
�
�>�@�
?�!@�
?�
?��/�
.�
.��<�
;�
;��<�
;�
;��/�
.�
.��@�
?�
?�sm�7K4�7L�AL�:L0�6:M�"BM�4L	�=L	�L	�L	�L-	�%L-	�0M	�9M	�M	�
M	�M)	�!M)	c�J�[QQ[OQ22P!)z-S�-ca�
            import sys
            assert "io" not in sys.modules
            try:
                sys.stdin.truncate()
            except Exception as e:
                typ = type(e)
                assert typ.__module__ == "io", (typ, typ.__module__)
                assert typ.__name__ == "UnsupportedOperation", (typ, typ.__name__)
            else:
                raise AssertionError("Expected UnsupportedOperation")
            )r�textwrap�dedentrs&r�test_startup_optimization� IOTest.test_startup_optimization�s ��	��t�X�_�_�
�
&
�
	r�pipe�requires os.pipe()c�.```
�U1QknU1Qkn
U1QkoU1QkoU1QkoU1QkoU1QkoU1QkoRQ1R
Q	1UQ
1UQ1UQ1UQ
1UQ
1UQ1ROQ1ROQ11
oUU
U1QkoSFDvvq�ROU	29^tt^2U	R
6Xc([O%fROQ2U	29^tt^2oUV�U
2PPP2PPP2Jx	P!)%fhK9h)%fhJ�9h)c�:�[O2vq[OU2ROUQ2!)rO)�osrb�close�FileIO)rOrGrs  �r�pipe_reader�3IOTest.test_optional_abilities.<locals>.pipe_reader�s,����W�W�Y�F�Q��H�H�Q�K��;�;�q�#�&�&rc�>:�[O2vqRO[OU2[O
[OU]d1Q5oUO2ROUO2ROUQ2!)�d��target�argsrG)
rfrb�
addCleanuprg�	threading�Threadr4�start�joinrh)rOrG�threadrs   �r�pipe_writer�3IOTest.test_optional_abilities.<locals>.pipe_writer�sf����W�W�Y�F�Q��O�O�B�H�H�a�(��%�%�R�W�W�A�s�8�D�F��L�L�N��O�O�F�K�K�(��;�;�q�#�&�&rc�D:�RORO22!r)�BufferedReader�MockUnseekableIOrs�r�buffered_reader�7IOTest.test_optional_abilities.<locals>.buffered_reader������&�&�t�'<�'<�'>�?�?rc�D:�RORO22!r)�BufferedWriterrzrs�r�buffered_writer�7IOTest.test_optional_abilities.<locals>.buffered_writer�r}rc�D:�RORO22!r)�BufferedRandom�BytesIOrs�r�buffered_random�7IOTest.test_optional_abilities.<locals>.buffered_random�s����&�&�t�|�|�~�6�6rc�b:�RORO2RO22!r)�BufferedRWPairrzrs�r�buffered_rw_pair�8IOTest.test_optional_abilities.<locals>.buffered_rw_pair�s-����&�&�t�'<�'<�'>��%�%�'�)�
)rc�d:�U1QkQRO2oROU2Q2!)c�v:�\sQs]�sYOO
sYOOsQsP!)�MIOTest.test_optional_abilities.<locals>.text_reader.<locals>.UnseekableReader�)�__name__�
__module__�__qualname__�__firstlineno__�BufferedIOBase�writabler$�__static_attributes__rs�r�UnseekableReaderr��s%����.�.�7�7���+�+�1�1�rr��ascii�rz�
TextIOWrapper)r�rs �r�text_reader�3IOTest.test_optional_abilities.<locals>.text_reader�s.���
2�4�#8�#8�
2��%�%�&6�&8�'�B�Brc�d:�U1QkQRO2oROU2Q2!)c�v:�\sQs]�sYOO
sYOOsQsP!)�MIOTest.test_optional_abilities.<locals>.text_writer.<locals>.UnseekableWriterr�)r�r�r�r�r��readabler4r�rs�r�UnseekableWriterr��s%����.�.�7�7���*�*�/�/�rr�r�r�)r�rs �r�text_writer�3IOTest.test_optional_abilities.<locals>.text_writer�s.���
0�4�#8�#8�
0��%�%�&6�&8�'�B�Br�fr�fwrOrG�rws�rwc�x:�QU7oR	OUO2U2QU7oR	OUO2U2[UR	O2%cQoL<[UR	O
R	O12%cQoLR	OQ2QU7cUO2L R	O[UO2U%c#UO]2UO2LAR	O[UO]2R	O[UO2U%cUOW2L!R	O[UOW2[OOQ2%cURR17cP!QU7oR	OUO!2U2U%c#UO#2UO%]2LAR	O[UO"2R	O[UO$]2U%c,U%c$UO'2UO']2P!R	O[UO&2R	O[UO&]2P!)rOrG�3�3zUnknown base classr+�win�s)r#r�r��
isinstance�
TextIOBaser��	RawIOBase�fail�filenor)�OSErrorr4r$�sys�platform�
startswith�seekabler&r'r%)
�test�obj�	abilitiesr�r�r:r�rirvrs
&&&    ���r�do_test�/IOTest.test_optional_abilities.<locals>.do_test�s�����i�'�H����S�\�\�^�X�6��i�'�H����S�\�\�^�X�6��#�t���/�/����C�$�"5�"5�t�~�~�!F�G�G����	�	�.�/��i���
�
���!�!�'�3�:�:�6����������
��!�!�'�3�8�8�Q�7��!�!�'�3�8�8�4���	�	�$���!�!�'�3�9�9�d�;��|�|�&�&�u�-�-�$���;.�3.���i�'�H����S�\�\�^�X�6�����
�������!�!�'�3�8�8�4��!�!�'�3�8�8�Q�7��H��������Q���!�!�'�3�<�<�8��!�!�'�3�<�<��;rzNeed threads)r��StringIO�subTestr�can_start_threadrB)rr{r�r�r�r�r��testsr�r�r�r�rirvsf           @@r�test_optional_abilities�IOTest.test_optional_abilities�s���	'�
	'�	@�	@�	7�	)�	C�	C��$��+�t�!4�
�c�"�_�c�$:�
�e�$�'7��&>�
�#���c� 2�
�\�\�5�!�D�M�M�5�#9�
��1	<�f"'��T����d�#�#��;�&�/?�/P�/P�/P��M�M�.�1��V�V�s��D�y�1��$�#�"'��V��$�#�#�s<�D	�D	�0 D	�
C0
�D	�0D�9D�;D	�D
�D
c
�^�QoUO[UOUQQQ5[UQ2o[O
29^tt^2[OQ[2UO[UOUQQQ5PPP2P!)%fhP!9h)zfoobarrGrHrIr��ignore)r)rArRr6�warnings�catch_warnings�simplefilter�DeprecationWarning)r�fn_with_NUL�bytes_fns&  r�test_open_handles_NUL_chars�"IOTest.test_open_handles_NUL_charss|�� �����*�d�i�i��c�G��T���g�.��
�
$�
$�
&�
&��!�!�(�,>�?����j�$�)�)�X�s�W��U�'�
&�
&�
&�s�AB�B,	�$B,	c���UO[OQ]Q59^tt^2oUOUO	2P
2UOUO2P	2UOUO
2P	2UOU2PPP2UO[OQ]Q59^tt^2oUOUO	2P	2UOUO2P
2UOUO
2P	2UOU2PPP2P!)%fhK�9h)%fhP!9h)rKrLrN�	rRrrr#r�r�r�r-r;rCs& r�test_raw_file_io�IOTest.test_raw_file_ios���
�Y�Y�y�'�'���Y�
;�
;�q����Q�Z�Z�\�5�1����Q�Z�Z�\�4�0����Q�Z�Z�\�4�0��N�N�1��	<�
�Y�Y�y�'�'���Y�
;�
;�q����Q�Z�Z�\�4�0����Q�Z�Z�\�5�1����Q�Z�Z�\�4�0��M�M�!��	<�
;�<�
;��
<�
;�
;�s%�A2E�A2E�E	�E	�E0	�(E0	c���UO[OQ29^tt^2oUOUO	2P
2UOUO2P	2UOUO
2P	2UOU2PPP2UO[OQ29^tt^2oUOUO	2P	2UOUO2P
2UOUO
2P	2UOUP	2PPP2P!)%fhK�9h)%fhP!9h)rKrNr�rCs& r�test_buffered_file_io�IOTest.test_buffered_file_io(s���
�Y�Y�y�'�'��
.�
.�!����Q�Z�Z�\�5�1����Q�Z�Z�\�4�0����Q�Z�Z�\�4�0��N�N�1��	/�
�Y�Y�y�'�'��
.�
.�!����Q�Z�Z�\�4�0����Q�Z�Z�\�5�1����Q�Z�Z�\�4�0��M�M�!�T�"�	/�
.�/�
.��
/�
.�
.�s%�A2E	�A3E�	E	�E	�E-	�%E-	c���UO[OQ29^tt^2oUOQ2PPP2UO[OQ29^tt^2oUO	UO2Q2UO	UO]
2Q2UO	UO]2Q2UO	UO]2Q2UO	UO2Q2UO	UOP2Q2UO
[UO
Q	2PPP2UO[OQ
QQ59^tt^2oUO
[UO
Q	2PPP2P!)%fhCK}9h)%fhKz9h)%fhP!9h)
rKs"abc
def
xyzzy
foobar
another linerNsabc
sdef
sxyszzy
sfoobar
sanother lineg333333@rOrHrI)rRrrr$r#rSr)r*rCs& r�
test_readline�IOTest.test_readline4sL��
�Y�Y�y�'�'��
.�
.�!�
�G�G�@�A�/�
�Y�Y�y�'�'��
.�
.�!����Q�Z�Z�\�8�4����Q�Z�Z��^�X�6����Q�Z�Z��]�E�2����Q�Z�Z��]�H�5����Q�Z�Z�\�?�;����Q�Z�Z��-��?����i����S�9�/��Y�Y�y�'�'��w�Y�
?�
?�1����i����S�9�@�
?�/�
.�
.��
.�
.��@�
?�
?�s6�F0�,C&G�"G�0G	�9G	�G	�
G	�G(	� G(	c�~�QQUO2oUO[[1[U22P!)c�(`�\sQsQsnQsQsUsP!)�+IOTest.test_readline_nonsizeable.<locals>.R�Ec��P!rr�rs&rrS�4IOTest.test_readline_nonsizeable.<locals>.R.readlineF���rr�)r�r�r�r�rSr��__classdictcell__��
__classdict__s@r�Rr�E�����
�
rr�)�IOBaser)r*�
StopIteration�next�rr�s& r�test_readline_nonsizeable� IOTest.test_readline_nonsizeableBs-��	����	�	
���9�m�4�d�A�C�@rc�~�QQUO2oUO[U2O]2P!)c�(`�\sQsQsnQsQsUsP!)�'IOTest.test_next_nonsizeable.<locals>.R�Mc��P!rr�rs&r�__next__�0IOTest.test_next_nonsizeable.<locals>.R.__next__Nr�rr�)r�r�r�r�r�r�r�r�s@rr�r�Mr�rr�)r�r)r*�	readlinesr�s& r�test_next_nonsizeable�IOTest.test_next_nonsizeableJs,��	����	�	
���)�Q�S�]�]�A�6rc���UO2oUOU2UO2oUOUQ2UOU2oUO	UP	2P!)r2)r�r-�getvaluer#r;)rr+r:s&  r�test_raw_bytes_io�IOTest.test_raw_bytes_ioRsQ���L�L�N�����q���z�z�|������/�0��L�L�����
�
�a��rc��[OQ*Q6Xf
[%c)[OQQUO
*2UO
[OQ]29^tt^2oUOU2PPP2UO
[OQ29^tt^2oUOU2PPP2P!)%fhKT9h)%fhP!9h)�N�Nr��	largefilez-test requires %s bytes and a long time to run�w+b)
r�r�rr�requiresr?rRrrrDrCs& r�test_large_file_ops�IOTest.test_large_file_opsZs����<�<���u�$�������?�$�*�*�L�
N��Y�Y�y�'�'���
2�
2�a�����"�3�
�Y�Y�y�'�'��
/�
/�1�����"�0�
/�3�
2��
/�
/�
/�s$�;C�=C,�C)	�"C)	�,C=	�5C=	c	��QFD�oUO[OQU29^tt^2oUOQ2PPP2UO	WO
P	2UO[OQU29^tt^2o]]*PPP2UO
Q2J�	P!)%fhK9h)%fhK:9h[c"SO	SO
P	2CJh9h)�rKr>z1/0 didn't raise an exception)r�rl)rRrrr$r#�closedr��ZeroDivisionError)r�bufsizer+s&  r�test_with_open�IOTest.test_with_opengs����G����9�+�+�T�7�;�;�q������<����Q�X�X�t�,�
;��Y�Y�y�/�/��w�?�?�1��a�C�@�
�	�	�9�:� �;�;��@�?��$�
1�� � ����4�0�0�
1�sG�B:	�()C �
C
	�C �:C

�C

�
C
�C
�C � 	D�*D�Dc��UO[OQ29^tt^2oUOQ2PPP2UO[OQ]Q59^tt^2oUO	UO2]2PPP2UO[OQ29^tt^2oUO	UO2]2PPP2UO[OQQQ59^tt^2oUO
UO2]2PPP2P!)%fhCK
9h)%fhK�9h)%fhK�9h)%fhP!9h)rKr>�abrL�arHrI)rRrrr$r#r&�
assertGreaterrCs& r�test_append_mode_tell�IOTest.test_append_mode_tellus���
�Y�Y�y�'�'��
.�
.�!�
�G�G�F�O�/�
�Y�Y�y�'�'���Y�
;�
;�q����Q�V�V�X�q�)�<�
�Y�Y�y�'�'��
.�
.�!����Q�V�V�X�q�)�/�
�Y�Y�y�'�'��w�Y�
?�
?�1����q�v�v�x��+�@�
?�
/�
.�
.��
;�
;��
.�
.��
?�
?�
?�sG�D=�.!E�?!E$�!E7�=E	�E	�E!	�E!	�$E4	�-E4	�7F	�F	c	�,`�,nU1QkQUO2o[OP[129^tt^2U[O
Q2oUO
Q2=[O2UOR,QN2UO[O
Q29^tt^2oUOUO2Q2PPP2PPP2P!)%fhK9h)%fhP!9h)c�T:``�\sQsQsnUU1QksUU1QksUU1QksQsUsU9s	!)�(IOTest.test_destructor.<locals>.MyFileIO�c�t:�RO]2[RU_oU2P![cP!h9h��)�append�super�__del__�AttributeError�rr+�	__class__�records& ��rr�0IOTest.test_destructor.<locals>.MyFileIO.__del__�s8����
�
�a� �����A��C��&����s�
(�	7�7�7c�H:�RO]2[RU_	2P!)r1)rrrg�rrrs&��rrg�.IOTest.test_destructor.<locals>.MyFileIO.close������
�
�a� ���
�rc�H:�RO]2[RU_	2P!)r�)rr�flushrs&��rr�.IOTest.test_destructor.<locals>.MyFileIO.flush�rrr�)
r�r�r�r�rrgrr�r��
__classcell__�rr�rs@@�r�MyFileIOr�s����
�
 �
 �
 rr"rKr>rN�rr1r�)rhr	�check_warnings�ResourceWarningrrr$r�
gc_collectr#rRr4)rr"r+rs&  @r�test_destructor�IOTest.test_destructors������	 �t�{�{�	 ��
+�
+�R��,A�
B�
B���)�)�4�0�A�
�G�G�F�O����� ����V�Y�/����9�+�+�T�2�2�a�� � �����6�2�3�
C�
B�3�2��
C�
B�
B�s1�A;D�<!C/	�D�/C?
�8C?
�:D�D	�D	c�`�,nU1QkQU2oU2o=[O2UOR,QN2P!)c�Z:``�\sQsQsnQsUU1QksUU1QksUU1QksQsUs	U9s
!)�+IOTest._check_base_destructor.<locals>.MyIO�c�2�]Um]Um]UmP!r)�on_del�on_close�on_flushrs&r�__init__�4IOTest._check_base_destructor.<locals>.MyIO.__init__�s��
 ��� !��
� !��
rc�:�ROUO2[RU_oU2P![cP!h9hr)rr.rrrrs& ��rr�3IOTest._check_base_destructor.<locals>.MyIO.__del__�s<����
�
�d�k�k�*�����A��C��&����s�
2�	A�A�Ac�\:�ROUO2[RU_
2P!r)rr/rrgrs&��rrg�1IOTest._check_base_destructor.<locals>.MyIO.close������
�
�d�m�m�,���
�rc�\:�ROUO2[RU_
2P!r)rr0rrrs&��rr�1IOTest._check_base_destructor.<locals>.MyIO.flush�r7r)r/r.r0)r�r�r�r�r1rrgrr�r�r r!s@@�r�MyIOr+�s����
"�
�
 �
 �
 rr:r#)rr&r#)r�baser:r+rs&&  @r�_check_base_destructor�IOTest._check_base_destructor�s<�����	 �4�	 �.
�F��
����������+rc�>�UOUO2P!r)r<r�rs&r�test_IOBase_destructor�IOTest.test_IOBase_destructor�s���#�#�D�K�K�0rc�>�UOUO2P!r)r<r�rs&r�test_RawIOBase_destructor� IOTest.test_RawIOBase_destructor�s���#�#�D�N�N�3rc�>�UOUO2P!r)r<r�rs&r�test_BufferedIOBase_destructor�%IOTest.test_BufferedIOBase_destructor�s���#�#�D�$7�$7�8rc�>�UOUO2P!r)r<r�rs&r�test_TextIOBase_destructor�!IOTest.test_TextIOBase_destructor�s���#�#�D�O�O�4rc�|�UO[OQ29^tt^2oUOQ2PPP2UO[OQ29^tt^2oUO	UO2Q2PPP2P!)%fhKc9h)%fhP!9h)rKr>rN�rRrrr$r#r4rCs& r�test_close_flushes�IOTest.test_close_flushes�su��
�Y�Y�y�'�'��
.�
.�!�
�G�G�F�O�/�
�Y�Y�y�'�'��
.�
.�!����Q�V�V�X�v�.�/�
.�/�
.��
.�
.�
.��#�B�,!B*�B'	� B'	�*B;	�3B;	c�```�[OQ[]
22n[RO22nUUU1QkoURO	22URO[OQ22URORO222URORO222URORO2RO222P!)�ic�:�U9^tt^2ROUOR2R2UOR12PPP2P!)%fhP!9hr)r#r$rU)r+r�nrs&���r�check�'IOTest.test_array_writes.<locals>.check�s:������ � ������Q�/����a�T�"�����s�4A�A	�A	rG)�array�ranger7�tobytesr�rhrrr�	MockRawIOr�r�)rrSrrRsf @@r�test_array_writes�IOTest.test_array_writes�s�����K�K��U�2�Y�'����	�	����	#�	�d�l�l�n��
�d�k�k�)�*�*�C�0�1�
�d�!�!�$�.�.�"2�3�4�
�d�!�!�$�.�.�"2�3�4�
�d�!�!�$�.�.�"2�D�N�N�4D�E�Frc	�n�UO[UO[OQQP
Q5P!)rGrH�rJ�closefd�r)rArRrrrs&r�test_closefd�IOTest.test_closefd�s,�����*�d�i�i��1A�1A�3�#*�E�	�	;rc	���UO[OQQQ59^tt^2oUOQ2PPP2UO[OQQQ59^tt^2oUOUO	2QQP
Q5oUOUO
2Q2UO]2UO2UO[UO2PPP2UO[OQ29^tt^2oUOUO	2QP
Q5oUOUO
2Q*Q	2UO2UO[UO[]22PPP2P!)%fhCK~9h)%fhK�9h)%fhP!9h)
rGrHrI�egg
rOr\rN�r]r�segg)
rRrrr$r�r#r4r'rgr)rAr5r(�rr+�files&  r�test_read_closed�IOTest.test_read_closed�sH��
�Y�Y�y�'�'��w�Y�
?�
?�1�
�G�G�G��@�
�Y�Y�y�'�'��w�Y�
?�
?�1��9�9�Q�X�X�Z��w��9�N�D����T�Y�Y�[�'�2��I�I�a�L��J�J�L����j�$�)�)�4�@��Y�Y�y�'�'��
.�
.�!��9�9�Q�X�X�Z��u�9�=�D����T�Y�Y�[��_�f�5��J�J�L����j�$�-�-��1��F�	/�
.�@�
?�
?��
?�
?��/�
.�
.�s7�F3�0BG�%BG�3G	�<G	�G	�G	�G+	�#G+	c	�n�UO[UO[OQQP
Q5P!)rOrHr\r^rs&r�test_no_closefd_with_filename�$IOTest.test_no_closefd_with_filename�s,�����*�d�i�i��1A�1A�3�#*�E�	�	;rc	�F�UO[OQ29^tt^2oUOQ2PPP2UO[OQQQ59^tt^2oUO	UO
OOP	2UOUO2QQP
Q5oUO	UO
OOP
2PPP2P!)%fhK�9h)%fhP!9h)rKsegg
rOrHrIr\)	rRrrr$r#r,�rawr]r�rds&  r�test_closefd_attr�IOTest.test_closefd_attr�s���
�Y�Y�y�'�'��
.�
.�!�
�G�G�H��/�
�Y�Y�y�'�'��w�Y�
?�
?�1����Q�X�X�\�\�1�1�4�8��9�9�Q�X�X�Z��w��9�N�D����T�[�[�_�_�4�4�e�<�@�
?�/�
.��
?�
?�
?�s$�C<�.BD�<D	�D	�D 	�D 	c�n�[O29^tt^2[OQ[2UO	[
OQ2oUOQ2Vm[OU2o=[O2PPP2UOW2U2UO[
OQ29^tt^2oUOUO!2Q2PPP2P!)%fhKz9h)%fhP!9h)r�rKsabcxxxrN)r�r�r�r%rhrrr$r+�weakref�refrr&�assertIsNonerRr#r4)rr+�wrs&  r�test_garbage_collection�IOTest.test_garbage_collection�s����
$�
$�
&�
&��!�!�(�O�<����I�,�,�d�3�A�
�G�G�I���C����Q��B����� �'�	
���"�$��#�
�Y�Y�y�'�'��
.�
.�!����Q�V�V�X�y�1�/�
.�'�
&��/�
.�
.�s$�A?D�%!D#�D 	�D 	�#D4	�,D4	c�T�Qo[OOU2%f!UOQO	U22[
OQ6�cUOQ2[O[O6cUOQ2UOUQ]Q59^tt^2oUO[UO2PPP2UOUQ29^tt^2oUO[UO2PPP2UOUQ29^tt^2oUO[UO2PPP2P!)%fhK�9h)%fhKh9h)%fhP!9h)z	/dev/zeroz{0} does not exist��z+test can only run in a 32-bit address spacez&test requires at least 2 GiB of memoryrNrLrO)rf�path�existsrB�formatr��maxsizer�real_max_memuse�_2GrRr)r@r4)r�zeror+s&  r�test_unbounded_file�IOTest.test_unbounded_file	s�����w�w�~�~�d�#�#��M�M�.�5�5�d�;�<��;�;��#��M�M�G�H��"�"�W�[�[�0��M�M�B�C�
�Y�Y�t�T�Q�Y�
/�
/�1����m�Q�V�V�4�0�
�Y�Y�t�T�
"�
"�a����m�Q�V�V�4�#�
�Y�Y�t�S�
!�
!�Q����m�Q�V�V�4�"�
!�	0�
/��
"�
"��
!�
!�
!�s6�?!E0�!F�!F�0F	�9F	�F	�F	�F'	�F'	c�*``�UOU-U@n,nUU1QkoURmUO[RO2UORO2UOR2UOR]*2QRmP!)c�::�RO,RQ$[2g)r )r�r�)r�r+s��r�	bad_flush�4IOTest.check_flush_error_on_close.<locals>.bad_flushs������
�F�1�I��)�Orc��P!rr�r�rr�<lambda>�3IOTest.check_flush_error_on_close.<locals>.<lambda>&s��$r)rRrr)r�rg�
assertTruer��assertFalse)rro�kwargsr�r�r+s&*, @@r�check_flush_error_on_close�!IOTest.check_flush_error_on_closest���
�I�I�t�&�v�&����	�������'�1�7�7�+�������!������������#���rc��UO[OQ]Q5[O[O[O
[O*2oUOUQ]Q5[O[O[O
[O*2oUOUQ]P
Q5[OU2UO[OQ2[O[O[O
[O*2oUOUQ2[O[O[O
[O*2oUOUQP
Q5[OU2UO[OQQQ5[O[O[O
[O*2oUOUQQQ5[O[O[O
[O*2oUOUQQP
Q5[OU2P!)rKrL)rMr]rcrGrHrIr\)r�rrrfrR�O_WRONLY�O_CREATrg)r�fds& r�test_flush_error_on_close� IOTest.test_flush_error_on_close(s���	
�'�'�	�(8�(8�$�!�'�L�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��D�A�'�>�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��D�A�u�'�M�
������'�'�	�(8�(8�$�?�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��D�1�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��D�%�'�@�
������'�'�	�(8�(8�#��'�P�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��C�'�'�B�
�W�W�Y�%�%�r�{�{�2�:�:�'=�
>���'�'��C�'�5�'�Q�
����rc���UO[OQ]Q5oUO2UO2UO2UO	[
UO2P!)rKrL)rRrrrgr)rArrCs& r�test_multi_close�IOTest.test_multi_close@sK���I�I�i�&�&���I�:��	���	�	���	�	���	����*�a�g�g�.rc�:�UOQ2oUOUO]2Q2UOUO]2Q2UOUO]2Q2UOUO]2P2UOUO]2Q2UOUO]2Q2UOUO]2P2UOUO]2Q2P!)�abc�dsab�csef�gr)r�r�N�efgN)�MockRawIOWithoutReadr#r4�r�rawios& r�test_RawIOBase_read�IOTest.test_RawIOBase_readGs����)�)�*L�M��������A���.�������A���-�������A���-�������A���-�������A���.�������A���-�������A���-�������A���,rc	��QQUOO2oUO[29^tt^2oU]2O	]2PPP2UO[
WO2Q2Q[OPQ1FD?oUO[29^tt^2UU2O	2PPP2JA	P!)%fhK�9h)%fhJi9h)c�:`�\sQsQsnU1QkQksQsQsUsP!)�>IOTest.test_RawIOBase_read_bounds_checking.<locals>.Misbehaved�Wc� :�U]6�cPgQP-!)r1�returnr�)rzr�s"�r�__annotate__�TIOTest.test_RawIOBase_read_bounds_checking.<locals>.Misbehaved.__init__.__annotate__Xs���
8�
8�4�
8rc��VmP!r��_readinto_return)r�readinto_returns&&rr1�GIOTest.test_RawIOBase_read_bounds_checking.<locals>.Misbehaved.__init__Xs��(7�%rc��UO!rr��r�bs&&rr5�GIOTest.test_RawIOBase_read_bounds_checking.<locals>.Misbehaved.readintoZs���,�,�,rr�)r�r�r�r�r1r5r�r�r�s@r�
Misbehavedr�Ws����
8�
8�
-�
-rr�z)readinto returned 2 outside buffer size 1rwi���)
�ior�r)rAr4r#�str�	exceptionr�r{)rr��cm�bad_sizes&   r�#test_RawIOBase_read_bounds_checking�*IOTest.test_RawIOBase_read_bounds_checkingTs���	-����*�*�	-��
�
�z�
*�
*�b��q�M���q�!�+�����R�\�\�*�,W�X�#�S�[�[�"�e�<�H��"�"�:�.�.��8�$�)�)�+�/�.�=�+�
*��/�.�.�s#�C�8C0	�C-	�&C-	�0D
�9D
c���QQUO2oUO[29^tt^2UQ,2oUO]2PPP2P!)%fhP!9h)c�:``�\sQsQsnU1QksQsQsUsU9s!)�?IOTest.test_RawIOBase_read_gh60107.<locals>.RawIOKeepsReference�gc�::�PUm[RU_U-U@P!r)�bufrr1)rror�rs&*,�rr1�HIOTest.test_RawIOBase_read_gh60107.<locals>.RawIOKeepsReference.__init__hs�������� �$�1�&�1rc�b�[U2UmUOO2UQ$]!):r��N)�
memoryviewr��_read_stack�pop)rr�s&&rr5�HIOTest.test_RawIOBase_read_gh60107.<locals>.RawIOKeepsReference.readintols*��&�c�?����+�+�/�/�1��C��r)r�)	r�r�r�r�r1r5r�r�r )rr�s@@r�RawIOKeepsReferencer�gs����
2�
�
rr�s1234)r�r)�BufferErrorr4)rr�r�s&  r�test_RawIOBase_read_gh60107�"IOTest.test_RawIOBase_read_gh60107dsM��
	�$�";�";�
	��
�
�{�
+�
+�'��	�2�E��J�J�q�M�,�
+�
+�
+�s�A�A*	�"A*	c���UO2UO2UO2UO2UO	21oSFDoUOUQ2J	P!)�__dict__)r�r�r�r�r��
assertHasAttr)rr�r�s&  r�test_types_have_dict�IOTest.test_types_have_dictwsT���K�K�M��N�N���O�O���M�M�O��L�L�N�
���C����s�J�/�rc��`�UO[OQQQ59^tt^2oUOQ2PPP2[O[O[O
2nU1QkoUOQQQUQ59^tt^2oUO
UO2Q2PPP2P!)%fhK�9h)%fhP!9h)rGrHrIrbc�
:�R!rr�)rx�flagsr�s&&�r�opener�"IOTest.test_opener.<locals>.opener�s����Ir�non-existentrO)rJr�)rRrrr$rf�O_RDONLYr#r4)rr+r�r�s&  @r�test_opener�IOTest.test_opener�s����
�Y�Y�y�'�'��w�Y�
?�
?�1�
�G�G�G��@�
�W�W�Y�%�%�r�{�{�
3��	�
�Y�Y�~�s�W�V�Y�
L�
L�PQ����Q�V�V�X�w�/�M�
L�@�
?��
M�
L�
L�s#�C�!C�C	�C	�C,	�$C,	c���QoUO[29^tt^2oUOQQUQ5PPP2UO[	WO
2Q2P!)%fhK79h)c��P!rr���fnamer�s&&r�	badopener�4IOTest.test_bad_opener_negative_1.<locals>.badopener�����Irr�rO�r�zopener returned -1�r)rArRr#r�r��rr�r�s&  r�test_bad_opener_negative_1�!IOTest.test_bad_opener_negative_1��T��	�
�
�
�z�
*�
*�b��I�I�n�c�)�I�<�+�����R�\�\�*�,@�A�+�
*���A&�&A6	�/A6	c���QoUO[29^tt^2oUOQQUQ5PPP2UO[	WO
2Q2P!)%fhK79h)c��Q!)r1���r�r�s&&rr��8IOTest.test_bad_opener_other_negative.<locals>.badopener�r�rr�rOr�zopener returned -2r�r�s&  r�test_bad_opener_other_negative�%IOTest.test_bad_opener_other_negative�r�r�c�<`�[O2nUO[29^tt^2oUO	QU1QkQ5PPP2UOWOO[O2P!)%fhKF9h)�fooc�
:�R!rr�)�namer�r�s&&�rr��/IOTest.test_opener_invalid_fd.<locals>.<lambda>�s���rr�)	r�make_bad_fdr)r�rRr#r��errno�EBADF)rr�r�s& @r�test_opener_invalid_fd�IOTest.test_opener_invalid_fd�sc����
"�
"�
$��
�
�
�w�
'�
'�2��I�I�e�$:�I�;�(�������+�+�U�[�[�9�(�
'�s�B�B	�B	c	���UO[Q29^tt^2oUO[Q29^tt^2oUOUO2P
Q5oUO	UO2P
Q5UO2UO
2UO2PPP2PPP2P!)%fhK9h)%fhP!9h)rNrc)rR�__file__rhr�r1rSrg)r�f1�f2�fileios&   r�test_fileio_closefd�IOTest.test_fileio_closefd�s���
�Y�Y�x��
&�
&�"�
�Y�Y�x��
&�
&�"��[�[�����e�[�<�F��O�O�B�I�I�K��O�7��K�K�M��L�L�N��K�K�M�'�'�
&�
&�
&��'�
&�
&�s/�C�A3C	�2C�C
�
C
�C�C(	� C(	c�6�[OU29^tt^2UO[29^tt^2UO	[
OQQ]Q5PPP2PPP2P!)%fhK9h)%fhP!9h)rGrH)rJrM�r	�check_no_resource_warningr)rArRrrrs&r�test_nonbuffered_textio�IOTest.test_nonbuffered_textio�s^��
�
6�
6�t�
<�
<��"�"�:�.�.��	�	�)�*�*�C�'�Q�	�O�/�=�
<�.�.��=�
<�
<��.�B�$A4	�"B�4B
�=B
�?B�B	�B	c�6�[OU29^tt^2UO[29^tt^2UO	[
OQQQQ5PPP2PPP2P!)%fhK9h)%fhP!9h)rGrH�invalid)rJ�newliner�rs&r�test_invalid_newline�IOTest.test_invalid_newline�s^��
�
6�
6�t�
<�
<��"�"�:�.�.��	�	�)�*�*�C�'�9�	�U�/�=�
<�.�.��=�
<�
<�rc
�N�QQUO2oU2oQFDloUOU29^tt^2[]2oUO[	V#2U2]2UO[U2Q2PPP2Jn	P!)%fhJ�9h)c�,`�\sQsQsnQs\sQsUsP!)�3IOTest.test_buffered_readinto_mixin.<locals>.Stream�c��Q!)�12345r��r�sizes&&rr4�8IOTest.test_buffered_readinto_mixin.<locals>.Stream.read�s��rr�)r�r�r�r�r4�read1r�r�r�s@r�Streamr�s����
 ��Errr)r5r8)r�r�rr#�getattrr6)rr�stream�methodr,s&    r�test_buffered_readinto_mixin�#IOTest.test_buffered_readinto_mixin�s��	�T�(�(�	����/�F����f�%�%�"�1���� � ���!8��!@�!�D�� � ��v���9�&�%�0�%�%�%�s�AB	�B$
�B$
c
�H`�U1QkoU[[O22U[[O[O222RO[OQQQ59^tt^2o[UO
22oRO[29^tt^2ROUQQQ5PPP2PPP2[P2oRO[29^tt^2ROUQQQ5PPP2[[2oRO[29^tt^2ROUQQQ5PPP2RO[Q29^tt^2RO[[O2QQQ5PPP2P!)%fhK�9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)c�N:�ROUQQQ59^tt^2oUOQ2PPP2ROUQQQ59^tt^2oROUO2Q2PPP2P!)%fhKW9h)%fhP!9h)rGrHrIrbrO)rRr$r#r4)rxr+rs& �r�check_path_succeeds�7IOTest.test_fspath_support.<locals>.check_path_succeeds�sw������4��w��7�7�1����� �8����4��w��7�7�1�� � �����7�3�8�7�8�7��8�7�7�s#�B�!B�B	�	B	�B$	�B$	rGrHrIzread/write/append mode�rwxa)r
rrrf�fsencoderRr�r)r*�FloatingPointError�assertRaisesRegexrA)rrr+�bad_pathsf   r�test_fspath_support�IOTest.test_fspath_support�sn���	4�	�H�Y�%5�%5�6�7��H�R�[�[��1A�1A�%B�C�D�
�Y�Y�y�'�'��w�Y�
?�
?�1�����
�+�H��"�"�9�-�-��	�	�(�C�'�	�:�.�@�
�D�>��
�
�
�y�
)�
)��I�I�h��g�I�6�*��.�/��
�
�
�1�
2�
2��I�I�h��g�I�6�3��
#�
#�J�0H�
I�
I��I�I�h�y�/�/�0�&�7�I�K�J�
I�.�-��@�
?�
?��*�
)��3�
2��J�
I�
I�sf�7G�<G	�G�	G*�G=�
,H�G
�G
�G�G'	�G'	�*G:	�3G:	�=H
	�H
	�H!	�H!	c���UOQ2oUOUO2Q2UOQ2oUOUO2Q2P!)r�sabcdefg)r�r�r�)r�r#r4rTr�s& r�test_RawIOBase_readall�IOTest.test_RawIOBase_readall�sR���)�)�*@�A���������z�2��)�)�*@�A���������*�5rc�z�QQUO2oQo]�oSFCDoUOU29^tt^2UvqVqxU[[U222o	[	U1U*2o
[V�2oUO
UU
2U2UO
[U
2U2UOU
PU[U22U1Vx*
*oUOV�PU2UO
[U	O2Vh*
2PPP2CJ	P!)%fhCJ9h)c�4`�\sQsQsnQsQsQsQsUsP!)�3IOTest.test_BufferedIOBase_readinto.<locals>.Reader��c��VmP!r��avail)rr-s&&rr1�<IOTest.test_BufferedIOBase_readinto.<locals>.Reader.__init__�s��"�
rc�N�UOPUoUOUPUmU!rr,)rr�results&& rr4�8IOTest.test_BufferedIOBase_readinto.<locals>.Reader.read�s)�����E�T�*��!�Z�Z���.��
��
rc�:�UO[U]22!)z$Returns no more than 5 bytes at once)r4�minrs&&rr�9IOTest.test_BufferedIOBase_readinto.<locals>.Reader.read1�s���y�y��T�1��.�.rr,)	r�r�r�r�r1r4rr�r�r�s@r�Readerr)�s����
#�
�
/�
/rr5)
)r5�
r0r0)r5r6�r7)r5r0r7r0)r5r7�r7)r5r6r�r�)r8r6r0r0)r8r6r7r0)r8r0r7r0)r8r7r8r0)r8r6r�r�)
r�r�r6rVr(rr#r7�assertSequenceEqualr-)rr5r��UNUSED_BYTEr�rr-�requestr0�readerr,�unuseds&           r�test_BufferedIOBase_readinto�#IOTest.test_BufferedIOBase_readinto�s��		/�T�(�(�		/�

�����D����d�#�#�15�.��w���e�E�l� 3�4��"�K�>�G�#;�<�� ��0��� � �����8�� � ��V��g�6��(�(�����%��-�H�%��7�+;�<���(�(����&�A�� � ��V�\�\�!2�E�N�C�$�#��#�#�#�s�CD(	�(D:
�1D:
c��QQUO2oU2oUO[UO2QUmP!)c�.`�\sQsQsnQsQsQsUsP!)�#IOTest.test_close_assert.<locals>.R�c��P!rr�)rr��values&&&r�__setattr__�/IOTest.test_close_assert.<locals>.R.__setattr__���rc��[2gr)r�rs&rr�)IOTest.test_close_assert.<locals>.R.flushs	���i�rr�)r�r�r�r�rFrr�r�r�s@rr�rBs����
�
 �
 rr�c��P!rr�rs&rr��*IOTest.test_close_assert.<locals>.<lambda>s��tr)r�r)r�rgr)rr�r+s&  r�test_close_assert�IOTest.test_close_asserts8��	 ����	 �

�C�����'�1�7�7�+�$��rc�L``	`
�]o]dn
]dn	U
1QkoU	U1QkoRO[OQ29^tt^2o[OU]*2o[O
V4U1Q5o[
U2Tt,tFDo[O
V$U1Q5MJ	oo[O29^tt^2o[OVs,*29^tt^2PPP2ROUO2PPP2PPP2RO[O[O2OR
U*2P!ttoh)%fhK�9h)%fhKw9h)%fhK�9h)r1c�r:�UO2[R2FDoUOQ2J	P!)�x)�waitrVr$)re�barrier�_�write_counts&& �r�writer�0IOTest.test_write_readline_races.<locals>.writer's&����L�L�N��;�'���
�
�3��(rc�:�UO2[R2FDoSFDoROUP2J	J!	P!)�)rRrVr#)rerSrT�line�
read_countrs&&  ��rr<�0IOTest.test_write_readline_races.<locals>.reader,s5����L�L�N��:�&�� �D��$�$�T�2�.�!�'r�w+rm)rRrrrq�BarrierrrrVr�catch_threading_exception�
start_threadsrr�exc_typer#rf�stat�st_size)r�thread_countrVr<r+rSrT�writersr�r[rUsf        @@r�test_write_readline_races� IOTest.test_write_readline_races s2��������
�	 �
	/��Y�Y�y�'�'��
.�
.�!��'�'��q�(8�9�G��%�%�V�g�,�G�F� %�l� 3�5� 3�1�!�'�'�v��L�I� 3�
�5�!�;�;�=�=��%�3�3�G�h�4F�G�G��H��!�!�"�+�+�.�>�/�	
�������!1�!1�2�:�:�$�|�3�	5��5�H�G��>�=��/�
.�sa�AF�$E(�'F�&F	�,E-
�.#F	�F�(F�-E=�6E=�8F	�F
�	F
�F�F#	�F#	r�)Fl)Cr�r�r�r�rrr-r;r?rDrZr�cpython_onlyr`�unittest�
skipUnless�hasattrrfr�r�r�r�r�r�r�r�r�rrr'r<r?rBrErHrLrYr_rfrirmrtrr�r�r�r�r�r�r�r�r�r�r�r�rrrr"r%r>rMr�requires_working_threadingrfr�r�r�s@rrrsq����+�+�2�04�B
�E�*�(?�4
������$�����V�,�.B�C�m2�D�m2�`V�
�
#�:�A�7��#�;�,�3�4,�<1�4�9�5�/�G�;�
G�;�
=�2�&5� 
��0/�-�,� �&	0�0�B�B�:�
�P�
V�
:�L�86�'D�R$��0�0�2�5�3�5rrc�(`�\sQsQsnQsQsUsP!)�CIOTest�@c���QQUO2oU2U2oV"m[OU2o==[O
2UO
U2U2P!)c�(`�\sQsQsnQsQsUsP!)�*CIOTest.test_IOBase_finalize.<locals>.MyIO�Fc��P!rr�rs&rrg�0CIOTest.test_IOBase_finalize.<locals>.MyIO.closeGrHrr�)r�r�r�r�rgr�r�r�s@rr:rrFs����
�
rr:)r�r�rprqrr&rr)rr:r�rss&   r�test_IOBase_finalize�CIOTest.test_IOBase_finalizeBsW��	�4�;�;�	�
	
���f����
�[�[��
�����������"�$��#rr�)r�r�r�r�rvr�r�r�s@rrnrn@s����$�$rrnc�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�TestIOCTypes�Tc��[OQ2oUOUOUOUO
UOUOUOUOUOUOUOUOUOUO,Um["O$Q6Xc&UO O'UO(2VmP!)�_io�win32)r�
import_moduler�r�ryrr�rh�IncrementalNewlineDecoderr�r��_BufferedIOBase�_BytesIOBuffer�_IOBase�
_RawIOBase�_TextIOBase�typesr�r�r�_WindowsConsoleIOr|�rr|s& rr�TestIOCTypes.setUpVs����)�)�%�0���������������K�K��J�J��)�)��L�L�����������K�K��N�N��O�O�
��
� �<�<�7�"��J�J���c�3�3�4��rc� �UOFDToUOUQ59^tt^2UO[Q29^tt^2QUmPPP2PPP2JV	P!)%fhK9h)%fhJ~9h))�tp�	immutable�bar)r�r�r r*r�)rr�s& r�test_immutable_types�!TestIOCTypes.test_immutable_typesls\���*�*�B������$�$��+�+�I�{�C�C�"�B�F�D�%�$��C�C��%�$�$�s/�A<	�A)
�A<	�)A9�2A9�4A<	�<B

�B

c�```�U1QknUUU1QknROoUOUOUOUOUO
UOUO.UOUO.UOUOUO.--o[OQ6Xc=V!O*UO*OUO 2RU2P!)c	�:�SFD7oROV!Q59^tt^2ROV!2PPP2J9	P!)%fhJN9h))r�r;)r��assertIsSubclass)r�r;r�rs&& �r�
check_subs�5TestIOCTypes.test_class_hierarchy.<locals>.check_subsss>������\�\�R�\�3�3��)�)�"�3�4�3��3�3�3�s�A	�A
�A
c��:�UO2FDVvq[U[2%cRU2J%[U[2%cRV!2JERO	Q2JX	P!)zcorrupt test dataset)�itemsr��dict�setr�)�d�k�vr��recursive_checkrs&  ���rr��:TestIOCTypes.test_class_hierarchy.<locals>.recursive_checkxsL������	����a��&�&�#�A�&���3�'�'��q�$��I�I�4�5�
"rr})r|r�r�r�r�ryrr�r�rhr�r�r�r�r��addr�)rr|�	hierarchyr�r�sf  @@r�test_class_hierarchy�!TestIOCTypes.test_class_hierarchyrs����	4�
	6��h�h���K�K��#�#��&�&��&�&��&�&��&�&��K�K�&�����J�J�!�����L�L��%�%�"��
�	�$�<�<�7�"��k�k�"�3�>�>�2�6�6�s�7L�7L�M��	�"rc��UOoUOTt-tFDp"P	aJ	ooP
V1O$UO2FD�vqEUO	VEQ59^tt^2UO
Q0oU1oU%c[
Vg-2oL5Qo	UO[U	29^tt^2[
Vg-2oPPP2PPP2J�	P!ttoh)%fhK#9h)%fhJ�9h)T)r��is_basetype�	_subclassznot an acceptable base type)	r|r�r�r�r�r��typer r*)
rr|r��datasetr�r�r��basesrT�msgs
&         r�test_subclassing�TestIOCTypes.test_subclassing�s����h�h��$(�J�J�/�J�q�d�7�J��/�&+��"�"�#�&�}�}��O�B������=�=��+�+��i�0�������T�"�-�A�7�C��/�/�	�3�?�?� ��b�1��@�>�=� /��0�@�?��>�=�=�s;�
C�(C+	�-C+	�0
C
�=C+	�C(�!C(�#C+	�+C<
�4C<
c�`�UOo[OVO2P!r)r|r�check_disallow_instantiationr�r�s& r�test_disallow_instantiation�(TestIOCTypes.test_disallow_instantiation�s���h�h���,�,�T�3E�3E�Frc��UOO2oUO[Q29^tt^2UO	]P]-12PPP2UO	PP]-12UOUO
2P2UO	PP]-12UOUO
2P2P!)%fhK|9h)z*initial_value must be str or None, not int)r|r�r r*�__setstate__r#r�)rr�s& r�test_stringio_setstate�#TestIOCTypes.test_stringio_setstate�s����h�h���!��
�
#�
#��8�
�
�
���a��Q��^�,�	
�	���$��A�r�*�+���������,����"�b�!�R��)���������,�
�
�s�C�C	�
C	)r|r�)r�r�r�r�rr�r�r�r�r�r�r�r�s@rryryTs*�����,#�%#�N2� G�
-�
-rryc��\sQsQsQsP!)�PyIOTest�r��r�r�r�r�r�r�rrr�r��s��rr�c�.`�\sQsQsnQsQsQsUsP!)�APIMismatchTest�c��[O[O[OQQ5oUOU[
2QQ5P!)z:Test that pyio RawIOBase class has all c RawIOBase methods)r�z6Python RawIOBase does not have all C RawIOBase methods�r�)�__weakref__r�)r�detect_api_mismatch�pyior�r�r#r��r�mismatchs& r�test_RawIOBase_io_in_pyio_match�/APIMismatchTest.test_RawIOBase_io_in_pyio_match�s:���.�.�t�~�~�r�|�|�6^�`������3�5�.f��grc��[O[O[O2oUOU[
2QQ5P!)z:Test that c RawIOBase class has all pyio RawIOBase methodsz6C RawIOBase does not have all Python RawIOBase methodsr�)rr�r�r�r�r#r�r�s& r�test_RawIOBase_pyio_in_io_match�/APIMismatchTest.test_RawIOBase_pyio_in_io_match�s4���.�.�r�|�|�T�^�^�L������3�5�.f��grr�)r�r�r�r�r�r�r�r�r�s@rr�r��s����h�h�hrr�c�,`�\sQsQsnPsQ sQ sQsQsQs	Qs
\O\
\Q2Q2Q2sQ	sQ
sQsQsQ
sQsQsQsQs\O\
\Q2Q2Q2sQs\O6\O:Q2Q2s\O6\O:Q2Q2s\O\
\Q2Q2\O\
\Q2Q2Q22s Qs!Qs"Qs#Qs$Qs%Qs&Q s'Us(P!)!�
MiscIOTest��c�P�[O[O2P!rrrs&rr�MiscIOTest.tearDown�rrc��[OVOUOUOUO
Q5P!))�extra�not_exported)r�check__all__r��name_of_module�extra_exportedr�rs&r�test___all__�MiscIOTest.test___all__�s0�����T�7�7�D�,?�,?�#'�#6�#6�*.�*;�*;�	=rc��UO[OQ]Q5oUOUOQ2UO2UO[OQQQ5oUOUOQ2UOUOOQ2UOUOOOQ2UOUO2QP
Q5oUOUOQ2UOUOOQ2UOUOUO22UOUOOUO22UO2UO2P!)rKrLr]rHrIzwb+rc)
rRrrr#�modergr,rlr�r�)rr+�gs&  r�test_attributes�MiscIOTest.test_attributes�s-���I�I�i�&�&���I�:���������&�	���	��I�I�i�&�&��w�I�?��������D�1���������E�2���������*�*�E�2��I�I�a�h�h�j�$��I�6��������T�*���������T�*�������Q�X�X�Z�0���������Q�X�X�Z�0�	���	�	���	rc	��QFDnoUO[29^tt^2oUO[OU2PPP2UOQ[
WO22Jp	P!)%fhK;9h)�Uzinvalid mode)r��rUzr+U)r)rArRrr�assertInr�r�)rr�r�s&  r�test_removed_u_mode�MiscIOTest.test_removed_u_mode�sV��&�D��"�"�:�.�.�"��	�	�)�*�*�D�1�/��M�M�.�#�b�l�l�*;�<�'�.�.�s�!A9	�9B	
�B	
rbrcc�@�[O2vqUO[OU2UO	UQQQ5oUOUO2[
OQ6wc"UOUO22P!P!)rrHrIr})	rfrbrprgrRr�r�r�r�)rrOrGr+s&   r�test_open_pipe_with_append�%MiscIOTest.test_open_pipe_with_append�sn���w�w�y���������!�$��I�I�a��w�I�/�������� ��<�<�7�"����Q�Z�Z�\�*�#rc�&�QQ-QQ-QQQ]-QQQ]-QQQ]-QQ-QQ-QQQ]-QQQ]-QQQ]-QQ-QQ-QQQ]-QQQ]-QQQ]-1FCDHoQUQ*7cQ	UQ
$UO[O1-U@oUO2UO	[
UO2UO	[
UO2UO	[
UO2UO	[
UO2[UQ2%c"UO	[
UO]2UO	[
UO2[UQ2%cBUO	[
UOQ
2UO	[
UO2[UQ2%c!UO	[
UO2[UQ2%c+UO	[
UO[!Q
22[UQ2%c+UO	[
UO"[!Q
22UO	[
UO$2UO	[
UO&2UO	[
UO&]2UO	[
UO(]2UO	[
UO*2UO	[
UO,2SO	[
UO.QUQ*7cQLP2UO	[
UO0,2UO	[
[2U2CJK	P!)r�rGrKrMrOrNr]r�r�rHrJ�peekr�rTr5r8r)rRrrrgr)rArr��isatty�__iter__rkr�r4rrTr5r(r8rSr�r'r&r%r$rUr�)rr�r+s&  r�test_io_after_close�MiscIOTest.test_io_after_closes�����
������k�1�-���k�1�-���{�A�.���
������k�1�-���k�1�-���{�A�.���������{�A�.���{�A�.����Q�/��F�"�&��.�(�%,��z�"��	�	�)�*�*�5�f�5�A�
�G�G�I����j�!�'�'�2����j�!�(�(�3����j�!�(�(�3����j�!�*�*�5��q�&�!�!��!�!�*�a�f�f�a�8����j�!�&�&�1��q�'�"�"��!�!�*�a�g�g�t�<��!�!�*�a�g�g�6��q�)�$�$��!�!�*�a�i�i�8��q�*�%�%��!�!�*�a�j�j�)�D�/�J��q�+�&�&��!�!�*�a�k�k�9�T�?�K����j�!�*�*�5����j�!�+�+�6����j�!�+�+�q�9����j�!�&�&�!�4����j�!�&�&�1����j�!�*�*�5����j�!�'�'�%(�F�6�N�%:�c��
D����j�!�,�,��;����j�$��2�]rc��QQ[2oUP2oUO]U2oV2mV#m[O
U2o==[O2UOU2U2P!)c��\sQsQsQsP!)�*MiscIOTest.test_blockingioerror.<locals>.Ci8r�r�r�rr�Cr�8s��rr�)	r��BlockingIOErrorr��crprqrr&rr)rr�r�r�rss&    r�test_blockingioerror�MiscIOTest.test_blockingioerror6sc��	��	�
�b�E��� � ��A�&������
�[�[��^��
�q��������"�$��#rc�X�UOUO[O2UOUO[O2UOUO
[O2UOUO[O2P!r)�assertIsInstancer��abc�ABCMetar�r�r�rs&r�	test_abcs�MiscIOTest.test_abcsCsd�����d�k�k�3�;�;�7����d�n�n�c�k�k�:����d�1�1�3�;�;�?����d�o�o�s�{�{�;rc�4�UO[OQ]Q59^tt^2oUOV!O2UOV!O
2UO
V!O2UO
V!O2PPP2UO[OQ29^tt^2oUOV!O2UO
V!O
2UOV!O2UO
V!O2PPP2UO[OQQQ59^tt^2oUOV!O2UO
V!O
2UO
V!O2UOV!O2PPP2P!)%fhCKO9h)%fhK�9h)%fhP!9h�rKrLrGrHrI)	rRrrr�r�r��assertNotIsInstancer�r�)r�	abcmoduler+s&& r�_check_abc_inheritance�!MiscIOTest._check_abc_inheritanceJs~��
�Y�Y�y�'�'���Y�
;�
;�q��!�!�!�%5�%5�6��!�!�!�%8�%8�9��$�$�Q�(@�(@�A��$�$�Q�(<�(<�=�	<�
�Y�Y�y�'�'��
.�
.�!��!�!�!�%5�%5�6��$�$�Q�(;�(;�<��!�!�!�%=�%=�>��$�$�Q�(<�(<�=�	/�
�Y�Y�y�'�'��w�Y�
?�
?�1��!�!�!�%5�%5�6��$�$�Q�(;�(;�<��$�$�Q�(@�(@�A��!�!�!�%9�%9�:�	@�
?�<�
;�
;��
/�
.��
@�
?�
?�s8�A-G�	A-G3�(A-H�G0	�(G0	�3H	�<H	�H	�H	c�*�UOU2P!r)r�rs&r�test_abc_inheritance�MiscIOTest.test_abc_inheritance[s���#�#�D�)rc�2�UO[2P!r)r�r�rs&r�test_abc_inheritance_official�(MiscIOTest.test_abc_inheritance_official_s��	
�#�#�B�'rc�P�UOU-U@o[U2oUO[29^tt^2oPo[O
2PPP2UO
U[WOO]*22P!)%fhKH9hr)
rR�repr�assertWarnsr%rr&r�r��warningro)rror�r+rOr�s&*,   r�_check_warn_on_dealloc�!MiscIOTest._check_warn_on_deallocdsr���I�I�t�&�v�&����G��
�
�
�o�
.�
.�"��A���� �/�	
�
�
�a��R�Z�Z�_�_�Q�/�0�1�/�
.�s�B�B%	�B%	c���UO[OQ]Q5UO[OQ2UO[OQQQ5P!r�)rrrrs&r�test_warn_on_dealloc�MiscIOTest.test_warn_on_dealloclsN���#�#�I�$4�$4�d�a�#�H��#�#�I�$4�$4�d�;��#�#�I�$4�$4�c�G�#�Lrc�`�,nU1QkoUOU2[O2vqERVE1*
nUOU,UN3-U@[O2vqERVE1*
n[O
U29^tt^2UOU,UN3QP
-U@PPP2P!)%fhP!9h)c�:�RFDo[OU2J	P![c,oSO[O6wcgPo=JQPo=hh9hr)rfrgr�r�r�)r��e�fdss  �r�cleanup_fds�9MiscIOTest._check_warn_on_dealloc_fd.<locals>.cleanup_fdsssG�������H�H�R�L������w�w�%�+�+�-��.���s�&�	A�A�A�A�Ar])rprfrbrr	rrR)rror�rrOrGr
s&*,   @r�_check_warn_on_dealloc_fd�$MiscIOTest._check_warn_on_dealloc_fdqs������	�	
����$��w�w�y����q�t����#�#�A�7��7��7��w�w�y����q�t���
�
6�
6�t�
<�
<��I�I�a�8�$�8��8��8�=�
<�
<�
<�s�B7�7C	�C	c�v�UOQ]Q5UOQ2UOQQQ5P!)rNrLrOrHrI)rrs&r�test_warn_on_dealloc_fd�"MiscIOTest.test_warn_on_dealloc_fd�s6���&�&�t�q�&�9��&�&�t�,��&�&�s�W�&�=rc�r�QoQQ-QQ-QQQ]-QQ-QQ-QQQ]-QQ-QQ-QQQ]-1	FD�oQ	UQ*7cQ
UQ$[[O]*2FD�oUOV2Q59^tt^2UO[
O1-U@9^tt^2oUO[U29^tt^2[OVC2PPP2PPP2PPP2J�	J�	P!)%fhK*9h)%fhK59h)%fhJ�9h)
z
cannot pickler�rGrKrMrOrNr]r�r�rHrJ)�protocolr�)
rV�pickle�HIGHEST_PROTOCOLr�rRrrr r*�dumps)rr�r�rr+s&    r�
test_pickling�MiscIOTest.test_pickling�s������
������{�A�.���
������{�A�.����������Q�/�
�F��&��.�(�%,��z�"�!�&�"9�"9�A�"=�>���\�\�8�\�C�C����9�#3�#3�>�v�>�>�!�!�3�3�I�s�C�C�"�L�L��5�D�?�D�C�?�
� D�C��?�>��D�C�C�sN�<+D%
�'D�C?�D�%D%
�?D�D�
D�D"�D"�D%
�%D6�.D6z9Emscripten corrupts memory when writing to nonblocking fdc�*�UOQ2P!)�i@��_test_nonblock_pipe_writers&r�test_nonblock_pipe_write_bigbuf�*MiscIOTest.test_nonblock_pipe_write_bigbuf�s���&�&�w�/rc�*�UOQ2P!)r�rrs&r�!test_nonblock_pipe_write_smallbuf�,MiscIOTest.test_nonblock_pipe_write_smallbuf�s���&�&�t�,r�set_blockingz(os.set_blocking() required for this testc��,o,o[O2vqE[OUP
2[OUP
2UOUQP	UQ5oUOUQP	UQ5oS9^tt^2S9^tt^2QFDSo]o	[	U	]*]a*,2U*o
UOU
2UO
U
2U	]*
o	JO	UO2U[UOP2*
oPPP2PPP2QO!U2QO!U2q2UOV#2UO#UO$2UO#UO$2P!SOc�oSOSO]*[O2SOSO]*SO2SP*PSOSP$SOSO22Qo
SO
S
2SOS
2Po=CJ�Po=hh9hSOc�oSOSO]*[O2SOSO]*SO2SOSO]2SOSO22Po=CJ5Po=hh9h)%fhCK9h)%fhCK"9h)FrN)r�r]rMrKsBLOCKEDr)i'�Ii�)rfrbr%rRr6rr$r�r#ror��EAGAIN�characters_writtenr4r�iterrtr�r�)rr�sent�receivedrOrG�rf�wf�NrPr�rs&&          rr�$MiscIOTest._test_nonblock_pipe_write�se�������w�w�y���
����5�!�
����5�!��Y�Y�q�t�T�W�Y�
E��
�Y�Y�q�t�T�W�Y�
E��
�R���#��%��A��#�Q��V�b�[�M�2�Q�6�����C�(�����
��Q���$�$�/��H�H�J��
��R�W�W�d�+�+�H�;�R�>���$�����(�);�h�����(�����	�	�"�����	�	�"��1�+�+�%��$�$�Q�V�V�A�Y����=��$�$�Q�V�V�A�Y��0D�0D�E�#�B�x�(=��)=�)=�>�D��H��O�O�B�G�G�I�.�$�C��H�H�S�M��K�K��$�$��%���+�+�/��$�$�Q�V�V�A�Y����=��$�$�Q�V�V�A�Y��0D�0D�E��$�$�Q�%9�%9�1�=��O�O�B�G�G�I�.�.��	/��/����R�R�R�s��?L6�
L"	�AF�#L"	�'I)�7L"	�L6�I&�I&� B:I!�L"	�!I&�&L"	�)L�9L�:BL�L"	�L�L"	�"L3
�+L3
�-	L6�6M	�?M	c��UO[OQQQ59^tt^2PPP2UO[UO[OQQQ5P!)%fhKD9h)rGrHrIrQ)rRrrr)�FileExistsErrorrs&r�test_create_fail�MiscIOTest.test_create_fail�sT��
�Y�Y�y�'�'��w�Y�
?�
?��@����/�4�9�9�i�6F�6F��V]��^�@�
?�s�A*�*A:	�3A:	c�|�UO[OQ29^tt^2oUOQ2PPP2UO[OQ29^tt^2oUO	QUO22PPP2P!)%fhKc9h)%fhP!9h)�xbsspamrNrKrCs& r�test_create_writes�MiscIOTest.test_create_writes�sv��
�Y�Y�y�'�'��
.�
.�!�
�G�G�G��/�
�Y�Y�y�'�'��
.�
.�!����W�a�f�f�h�/�/�
.�/�
.��
.�
.�
.�rNc�l�UO[UO[OQQQ5P!)zrwax+rHrIr^rs&r�test_open_allargs�MiscIOTest.test_open_allargs�s&�����*�d�i�i��1A�1A�7�U\��]rc��UOOo[oQo[OQUQU8QU8QU8QU8QU8QU8QU8Q	02o[Q
QQU2oUO
UO]
U2P!)
zBoom, Shaka Laka, Boom!z)
            import sys
            from zC import open, TextIOWrapper

            try:
                open(z, encoding=z�)
            except LookupError:
                pass
            else:
                sys.exit(21)

            try:
                open(z	, errors=z})
            except LookupError:
                pass
            else:
                sys.exit(22)

            fp = open(za, "rb")
            with fp:
                try:
                    TextIOWrapper(fp, encoding=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(23)

                try:
                    TextIOWrapper(fp, errors=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(24)

            sys.exit(10)
        �-X�devr])r�r�r�r^r_rr#�rc)r�mod�filenamer�code�procs&     r�test_check_encoding_errors�%MiscIOTest.test_check_encoding_errors�s����g�g������+�����$�����\��W�K�8��\��7�+�6� �l�#0�18�{�;.�/6�[�9	�9# �#
��H%�T�5�$��=��������"�d�+rc	�n�UOOo[o[OQUQU8QU8Q02o[QQQU2oUOO2oUO[U2]2UOU]*Q2UOU]*Q2P!)	z(            import sys
            from zN import open, TextIOWrapper
            import pathlib

            with open(zJ) as f:           # line 5
                pass

            pathlib.Path(z ).read_text()  # line 8
        r=�warn_default_encodingr]s<string>:5: EncodingWarning: s<string>:8: EncodingWarning: )r�r�r�r^r_r�err�
splitlinesr#r7�assertStartsWith)rr@rArBrCr�s&     r�test_check_encoding_warning�&MiscIOTest.test_check_encoding_warnings����g�g���������$���� �l�#�#��&	�	 �	
�� ��&=�t�T�J���8�8�&�&�(������X���*����h�q�k�+K�L����h�q�k�+K�Lrc���Qo[QQQU2oUOQUOO22[QQQU2oUOQUOO22P!)z(import io; print(io.text_encoding(None))r=zutf8=0r]slocalezutf8=1sutf-8)rr#�out�strip)rrBrCs&  r�test_text_encoding�MiscIOTest.test_text_encoding1s_��:����h��d�;������D�H�H�N�N�$4�5���h��d�;������4�8�8�>�>�#3�4rr�))r�r�r�r�r�r�r�rr�r�r�rirjrkrfr�r�r�r�r�r�r�rrrrr�skipIfr�
is_emscriptenr r#rr3r7r:rDrKrPr�r�r�s@rr�r��ss�����N��N��L�+�=�
�$=������V�,�.B�C�	+�D�	+�/3�b$�<�;�"*�(�
2�M�
9�&�����V�,�.B�C�>�D�>�6�,�_�_�W�*�*�,g�h�0�i�0��_�_�W�*�*�,g�h�-�i�-������^�4�C�E�
�����V�,�.B�C�0#�D�E�0#�d_�0�^�+,�ZM�*	5�	5rr�c��`�\sQsQsnQsQ	sQsQs\O2\
OQ2Q22s\O2\
OQ2Q22s
QsUsP!)
�CMiscIOTesti=c��QQUOO2oU2o[]2oUO[UO
U2P!)c�,`�\sQsQsnQQksQsUsP!)�<CMiscIOTest.test_readinto_buffer_overflow.<locals>.BadReaderiCc��QQ*!)r3i@Br�)rrRs&&rr4�ACMiscIOTest.test_readinto_buffer_overflow.<locals>.BadReader.readDs���e�|�#rr������r�r�r�r�r4r�r�r�s@r�	BadReaderrXCs����
$�
$rr^)r�r�r(r)rAr5)rr^�bufior�s&   r�test_readinto_buffer_overflow�)CMiscIOTest.test_readinto_buffer_overflowAs@��	$����.�.�	$�����a�L�����*�e�n�n�a�8rc�D�QO[22o[QU2vq4UOO	2oUO
]6wc-QO[22oUO
VV2P!UOUOQ22P!)a�if 1:
            import sys
            import time
            import threading
            from test.support import SuppressCrashReport

            file = sys.{stream_name}

            def run():
                while True:
                    file.write('.')
                    file.flush()

            crash = SuppressCrashReport()
            crash.__enter__()
            # don't call __exit__(): the crash occurs at Python shutdown

            thread = threading.Thread(target=run)
            thread.daemon = True
            thread.start()

            time.sleep(0.5)
            file.write('!')
            file.flush()
            r]z�Fatal Python error: _enter_buffered_busy: could not acquire lock for <(_io\.)?BufferedWriter name='<{stream_name}>'> at interpreter shutdown, possibly due to daemon threadsz.!)	�
format_map�localsrrH�decoder?�assertRegexr�rO)r�stream_namerB�resrTrH�patterns&&     r�&check_daemon_threads_shutdown_deadlock�2CMiscIOTest.check_daemon_threads_shutdown_deadlockJs����0�
�6�8�$�1	
�2&�d�D�1����g�g�n�n����6�6�Q�;�)�*4��F�H�)=�	
�

���S�*����S�Y�Y�t�_�-r�walltimec�*�UOQ2P!)�stdout�rjrs&r�,test_daemon_threads_shutdown_stdout_deadlock�8CMiscIOTest.test_daemon_threads_shutdown_stdout_deadlocks���	
�3�3�H�=rc�*�UOQ2P!)�stderrrors&r�,test_daemon_threads_shutdown_stderr_deadlock�8CMiscIOTest.test_daemon_threads_shutdown_stderr_deadlockxrrrr�)r�r|)r�)r�r�r�r�r�r�r`rjrrlr�requires_resourcerprur�r�r�s@rrUrU=sz���� �N�'�N�9�'.�R�0�0�2����z�*�>�+�3�>��0�0�2����z�*�>�+�3�>rrUc�$�\sQsQsQsQsQsQsP!)�PyMiscIOTesti~r�)�_pyior�)r��	open_code)�valid_seek_flags)r�r�r�r�r�r�r�r�r�rrryry~s��"�N�4�N�&�Lrryc�V`�\sQsQsnQQ2sQQ2sQsQsQsUs	P!)	�
ProtocolsTesti�c�,`�\sQsQsnQQksQsUsP!)�ProtocolsTest.MyReaderi�c��Q!)rr�)r�szs&&rr4�ProtocolsTest.MyReader.read�s��rr�r[r]r�s@r�MyReaderr��s����	�	rr�c�4`�\sQsQsnU1QkQksQsUsP!)�ProtocolsTest.MyWriteri�c�":�U]6�cPgQRZ-!)r1r�)r6)rzr�s"�rr��)ProtocolsTest.MyWriter.write.__annotate__�s���	�	�5�	rc��P!rr�r�s&&rr$�ProtocolsTest.MyWriter.write�s��rr�)r�r�r�r�r$r�r�r�s@r�MyWriterr��s����	�	rr�c��UOUO[O2UO	[
[O2P!r)r�r�r�r5�assertNotIsSubclassr�rs&r�test_reader_subclass�"ProtocolsTest.test_reader_subclass��.�����d�m�m�R�Y�Y�7�� � ��b�i�i�0rc��UOUO[O2UO	[
[O2P!r)r�r�r��Writerr�r�rs&r�test_writer_subclass�"ProtocolsTest.test_writer_subclass�r�rr�)
r�r�r�r�r�r�r�r�r�r�r�s@rr~r~�s(��������1�1�1rr~�__main__).�__doc__r�rUr�rfrr�r^rqrir�rpr�r�test.support.script_helperrrr�test.supportrrrrr	�test.support.os_helperr
�utilsrrr
r�rzr�rrnrh�TestCaseryr�r�r�rUryr~r��mainr�rr�<module>r�s)���
���	�
�
�������C�C���,�3�3�	��_5�_5�D$�f�i�$�(	���e-�8�$�$�e-��e-�N	�v�z�	�	���h�h�'�'�h��h� i5�i5�X>>�*�i�>>�B'�:�z�'�1�H�%�%�1�$�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit