403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pandas/tests/io/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/io/__pycache__/test_common.cpython-312.pyc
�

0	�g�\���dZddlZddlZddlmZddlmZmZmZddl	Z	ddl
Z
ddlmZddl
Z
ddlZddlZddlZddlmZddlmcmZddlZddlmZddlmcmZej@jCd�Z"Gd�d	�Z#e$e#egZ%	dd
l&m'Z(e%jSe(�e
jVjYe
jVj[e.��Z/Gd�d�Z0ejbd
��Z2Gd�d�Z3d�Z4ej@jkdddg�ej@jkdddg�d���Z6d�Z7ej@jkdeddfeddfg�d��Z8ej@jkdgd��ej@jkdddg�d ���Z9d!�Z:d"�Z;d#�Z<d$�Z=ej@jkd%ej|ej~ej�ej�ej�ej�ej�ej�ej�g	�d&��ZGy#e*$rY���wxYw)'z0
Tests for the pandas.io.common functionalities
�N)�partial)�BytesIO�StringIO�UnsupportedOperation)�Path)�is_platform_windowsz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningc��eZdZdZdd�Zd�Zy)�CustomFSPathz%For testing fspath on unknown objectsNc��||_y�N��path)�selfrs  �=C:\Python312\Lib\site-packages\pandas/tests/io/test_common.py�__init__zCustomFSPath.__init__%s	����	�c��|jSrr
�rs r�
__fspath__zCustomFSPath.__fspath__(s���y�y�r)�returnN)�__name__�
__module__�__qualname__�__doc__rr�rrr
r
"s��/��rr
)�localc��eZdZdZd�Zd�Zd�Zejd�d��Z	d�Z
d�Zejjd	e�d
��Zejjd	eeeg�d��Zd�Zd
�Zd�Zd�Zejjdej4dedfej8dedfej:dedfej<dedfej@dedfejBdedfejDdedfejFdedfejHdedfg	�d��Z%ejjdejLjNdedfejLjPded fejLjRdedfejLjTdedfejLjVded!fejLjXdedfejLjZdedfejLj\dedfg�d"��Z/ejjdej4dedfej`dedfej8dedfej:dedfej<dedfej@dedfejBdedfejDdedfejFdedfejHdedfg
�d#��Z1ejjd$ej4dd%fej`dd%fej8dd&fej:dd'fej<dd(fej@dd)fejBdd*fejDdd+fejFdd,fejHdd-fg
�d.��Z2ejjd/d0idfd1d2d3id3fd4idfd5idfd6idfd7idfd8idfd9d:ejfd;�idfg�d<��Z4d=�Z5y>)?�TestCommonIOCapabilitiesziindex,A,B,C,D
foo,2,3,4,5
bar,7,8,9,10
baz,12,13,14,15
qux,12,13,14,15
foo2,12,13,14,15
bar2,12,13,14,15
c���d}tj|�}||k7sJ�tjj	|�sJ�tjj|�|k(sJ�y)Nz
~/sometest)�icom�_expand_user�osr�isabs�
expanduser�r�filename�
expanded_names   r�test_expand_userz)TestCommonIOCapabilities.test_expand_userDsX�����)�)�(�3�
���(�(�(��w�w�}�}�]�+�+�+��w�w�!�!�(�+�}�<�<�<rc��d}tj|�}||k(sJ�tjj	|�|k(sJ�y)Nz/somefolder/sometest)r r!r"rr$r%s   r�test_expand_user_normal_pathz5TestCommonIOCapabilities.test_expand_user_normal_pathLsB��)���)�)�(�3�
���(�(�(��w�w�!�!�(�+�}�<�<�<rc���tjtd��}|dk(sJ�tjtd��}|tjjdd�k(sJ�y)N�.zfoo//bar�foo�bar)r �stringify_pathrr"r�join)r�rel_path�redundant_paths   r�test_stringify_path_pathlibz4TestCommonIOCapabilities.test_stringify_path_pathlibSsT���&�&�t�C�y�1���3�����,�,�T�*�-=�>��������e�U�!;�;�;�;rzpy.pathc���tjjdd�}tjj|�}t	|�}tj|�|k(sJ�y)Nr-r.)r"rr0�abspath�	LocalPathr r/)rr�abs_path�lpaths    r�test_stringify_path_localpathz6TestCommonIOCapabilities.test_stringify_path_localpathYsJ���w�w�|�|�E�5�)���7�7�?�?�4�(���$����"�"�5�)�X�5�5�5rc�R�td�}tj|�}|dk(sJ�y)N�foo/bar.csv)r
r r/)r�p�results   r�test_stringify_path_fspathz3TestCommonIOCapabilities.test_stringify_path_fspath`s*����'���$�$�Q�'����&�&�&rc��tjd�}tj�5}|j	d|��d��5}|tj|�k(sJ�	ddd�ddd�y#1swY�xYw#1swYyxYw)N�fsspeczfile://�wb��mode)�pytest�importorskip�tm�ensure_clean�openr r/)rr@r�
fsspec_objs    r�!test_stringify_file_and_path_likez:TestCommonIOCapabilities.test_stringify_file_and_path_likees����$�$�X�.��
�_�_�
�	E�$����w�t�f�-�D��9�
E�Z�!�T�%8�%8��%D�D�D�D�
E�	E�	E�
E�
E��	E�	E�s#�A:�A.�A:�.A7	�3A:�:B�	path_typec�`�|\}}|d|z�}tj|d��}||k(sJ�y)Nr;�infer)�compression)r �infer_compression)r�compression_formatrK�	extension�expectedrrNs       r� test_infer_compression_from_pathz9TestCommonIOCapabilities.test_infer_compression_from_pathls;��0��	�8����2�3���,�,�T�w�G���h�&�&�&rc���tjtj���5}|dt|�jzdz�}tj|d�5}t|jj�j�sJ�tjj|�|jjk(sJ�	ddd�ddd�y#1swY�xYw#1swYyxYw)N)�dirz~/z	/sometest�w)�tempfile�TemporaryDirectoryr�home�namer �
get_handle�handle�is_absoluter"rr$)rrK�tmpr&�handless     r�test_get_handle_with_pathz2TestCommonIOCapabilities.test_get_handle_with_pathss����
(�
(�T�Y�Y�[�
9�	K�S� ���S�	���!6��!D�E�H�����3�/�
K�7��G�N�N�/�/�0�<�<�>�>�>��w�w�)�)�(�3�w�~�~�7J�7J�J�J�J�
K�	K�	K�
K�
K��	K�	K�s$�8C'�!A(C�
C'�C$	� C'�'C0c��t�5}tj|d�5}|j|k(sJ�	ddd�|jrJ�	ddd�jsJ�y#1swY�/xYw#1swY�$xYw)N�r)rr r[r\�closed)r�input_bufferr_s   r�test_get_handle_with_bufferz4TestCommonIOCapabilities.test_get_handle_with_buffer|sx��
�Z�	+�<�����s�3�
6�w��~�~��5�5�5�
6�#�*�*�*�*�*�	+��"�"�"�"�
6�
6��	+�	+�s!�A/�A#�A/�#A,	�(A/�/A8c��d}tjt|�dd��5}d}d}	|jj	|�}t|�|ksJ�t|�|kr.t|jj	��dk(sJ�||z
}n||z
}�m||j
d�k(sJ�	ddd�y#1swYyxYw)	N�&a,b,c
1,2,3
©,®,®
Look,a snake,🐍�rbF��is_textr�r�utf-8)r r[rr\�read�len�encode)r�datar_r=�	chunksize�chunks      r�)test_bytesiowrapper_returns_correct_byteszBTestCommonIOCapabilities.test_bytesiowrapper_returns_correct_bytes�s������_�_�X�d�^�T�5�
A�	2�W��F��I�����+�+�I�6���5�z�Y�.�.�.��u�:�	�)��w�~�~�2�2�4�5��:�:�:��e�O�F���%�����T�[�[��1�1�1�1�	2�	2�	2�s�B	B7�7Cc�|�tjd�}d}tjgd�gd�gd�d��}t	|�}tj|dd�	�5}|j|j�j�}tj||�|jrJ�	ddd�y#1swYyxYw)
Nzpyarrow.csvrg)�1�©�Look)�2�®za snake)�3ryu🐍��a�b�crhFri)
rDrE�pd�	DataFramerr r[�read_csvr\�	to_pandasrF�assert_frame_equalrc)r�pa_csvrprR�sr_�dfs       r�test_get_handle_pyarrow_compatz7TestCommonIOCapabilities.test_get_handle_pyarrow_compat�s����$�$�]�3�����<�<�%�,B�I\�]�
��
�T�N��
�_�_�Q��e�
4�	 ��������0�:�:�<�B��!�!�"�h�/��x�x��<�x�	 �	 �	 �s
�AB2�2B;c�t�tjt|j�d��5}tj|d��}ddd�tjt|j��}tj|�tjt|j�d��5}t|�}tj||jdg�tjtj|�|jdd�ddd�y#1swY��xYw#1swYyxYw)N�)rqT)�ignore_indexr)	rr�r�data1�concatrFr��next�iloc)r�readerr=rR�it�firsts      r�
test_iteratorz&TestCommonIOCapabilities.test_iterator�s���
�[�[��$�*�*�-��
;�	:�v��Y�Y�v�D�9�F�	:��;�;�x��
�
�3�4��
���f�h�/��[�[��$�*�*�-��
;�	D�r���H�E��!�!�%�����s�);�<��!�!�"�)�)�B�-����q�r�1B�C�	D�	D�
	:�	:��	D�	D�s�D"�3A&D.�"D+�.D7z#reader, module, error_class, fn_extr"�csv�txt�xlrd�xlsx�pyarrow�feather�tables�h5�dta�sas7bdat�json�picklec�l�tj|�tjj	t
dd|z�}d|�d�}d|�d�}d}d}	d	|�d
|�d�}
d|�d�}d|�d�}d
|��}
tj|d|�d|�d|�d|	�d|
�d|�d|�d|
�d���5||�ddd�y#1swYyxYw)Nrp�does_not_exist.�File (b')?.+does_not_exist\.�'? does not exist�:\[Errno 2\] No such file or directory: '.+does_not_exist\.�'zExpected object or value�7path_or_buf needs to be a string file path or file-like�#\[Errno 2\] File .+does_not_exist\.�$ does not exist: '.+does_not_exist\.�<\[Errno 2\] 没有那个文件或目录: '.+does_not_exist\.�?\[Errno 2\] File o directory non esistente: '.+does_not_exist\.�+Failed to open local file.+does_not_exist\.�(�|�)��match)rDrEr"rr0�HERE�raises)rr��module�error_class�fn_extr�msg1�msg2�msg3�msg4�msg5�msg6�msg7�msg8s              r�test_read_non_existentz/TestCommonIOCapabilities.test_read_non_existent�s��	���F�#��w�w�|�|�D�&�*;�f�*D�E��.�v�h�6G�H��L�V�H�TU�V��)��H��2�6�(�;#�#)�(�!�
-�	
�O�v�h�VW�X��N�v�h�VW�X�	
�>�f�X�F��
�]�]���t�f�A�d�V�1�T�F�!�D�6��4�&��$��q���a��v�Q�O�
�	�
�4�L�		�	�	�s�	B*�*B3z#method, module, error_class, fn_ext�html�parquetc�(�tj|�tjgd�gd�gd�d��}tj
j
tddd|z�}tj|d�	�5|||�ddd�y#1swYyxYw)
N)r���)r�r��)r�r�rkr{rp�missing_folderr�z@Cannot save file into a non-existent directory: .*missing_folderr�)	rDrErr�r"rr0r�r�)r�methodr�r�r��dummy_framers       r�#test_write_missing_parent_directoryz<TestCommonIOCapabilities.test_write_missing_parent_directory�sz��	���F�#��l�l����#S�T���w�w�|�|�D�&�*:�<M�PV�<V�W��
�]�]��U�
�	&�
�;��%�		&�	&�	&�s�5
B�Bc��tj|�tjj	dd|z�}|jtdd��d|�d�}d|�d�}d	}	d
}
d|�d|�d�}d
|�d�}d|�d�}
d|��}tj|d|�d|�d|	�d|
�d|�d|�d|
�d|�d���5||�ddd�y#1swYyxYw)N�~r�r!c�B�tjjd|�S)Nr-)r"rr0)�xs r�<lambda>zJTestCommonIOCapabilities.test_read_expands_user_home_dir.<locals>.<lambda>s��B�G�G�L�L��PQ�<R�rr�r�r�r�z0Unexpected character found when decoding 'false'r�r�r�r�r�r�r�r�r�r�)rDrEr"rr0�setattrr r�)rr�r�r�r��monkeypatchrr�r�r�r�r�r�r�r�s               r�test_read_expands_user_home_dirz8TestCommonIOCapabilities.test_read_expands_user_home_dir�s��$	���F�#��w�w�|�|�C�!2�V�!;�<�����D�.�2R�S�.�v�h�6G�H��L�V�H�TU�V��A��H��2�6�(�;#�#)�(�!�
-�	
�O�v�h�VW�X��N�v�h�VW�X�	
�>�f�X�F��
�]�]���t�f�A�d�V�1�T�F�!�D�6��4�&��$��q���a��v�Q�O�
�	�
�4�L�		�	�	�s�+	B=�=Czreader, module, path)�iorpr�ziris.csv)r�rp�fixed_widthzfixed_width_format.txt)r�rp�excelz
test1.xlsx)r�rpr�zfeather-0_3_1.feather)r�rp�
legacy_hdfzdatetimetz_object.h5)r�rp�statazstata10_115.dta)r��sasrpztest1.sas7bdat)r�r�rpztsframe_v012.json)r�rpr�zcategorical.0.25.0.picklec���tj|�||�}t|�}||�}||�}|jd�rt	j
||�yt	j||�y)Nz.pickle)rDrEr
�endswithrF�assert_categorical_equalr�)rr�r�r�datapath�mypathr=rRs        r�test_read_fspath_allz-TestCommonIOCapabilities.test_read_fspath_all$sd��@	���F�#������d�#�������$�<���=�=��#��'�'���9��!�!�&�(�3rz"writer_name, writer_kwargs, module�to_csv�to_excel�engine�openpyxl�
to_feather�to_html�to_json�to_latex�	to_pickle�to_stata�
time_stampz2019-01-01 00:00c	��|dvrtjd�tjd�}tjd�}t	j
dddgi�}|5}|5}tj|�t
|�}	t||�}
|
|fi|��|
|	fi|��t|d�5}t|d�5}|d	k(rCt	j|fi|��}
t	j|fi|��}tj|
|�n'|j�}
|j�}|
|k(sJ�ddd�ddd�ddd�ddd�y#1swY�"xYw#1swY�&xYw#1swY�*xYw#1swYyxYw)
N)r��jinja2�string�fspath�Ar�r�rhr�)rDrErFrGrr�r
�getattrrH�
read_excelr�rm)r�writer_name�
writer_kwargsr��p1�p2r�r�r�r��writer�f_str�f_pathr=rRs               r�test_write_fspath_allz.TestCommonIOCapabilities.test_write_fspath_allQsg���,�&�����)�
�_�_�X�
&��
�_�_�X�
&��
�\�\�3��A��-�
(��
�	.�6�2�	.������'�!�&�)�F��R��-�F��6�+�]�+��6�+�]�+��f�d�#�

.�u�d�6�4�.@�

.�F��*�,� �]�]�5�B�M�B�F�!�}�}�V�E�}�E�H��)�)�&�(�;�"�Z�Z�\�F�%�{�{�}�H�!�X�-�-�-�

.�

.�	.�	.�	.�

.�

.��

.�

.��	.�	.��	.�	.�sV�E/�"AE#�-
E�:A0E	�*E�2E#�:E/�E
�E�E �E#�#E,	�(E/�/E8c��tjd�tjdddgi�}t	j
d�}t	j
d�}|5}|5}t
|�}|j|d��|j|d��tj|d��}tj|d��}ddd�ddd�t	j�y#1swY�(xYw#1swY�,xYw)	Nr�r�r�r�r�r�r.)�key)
rDrErr�rFrGr
�to_hdf�read_hdfr�)	rr�r�r�r�r�r�r=rRs	         r�test_write_fspath_hdf5z/TestCommonIOCapabilities.test_write_fspath_hdf5xs���	���H�%�
�\�\�3��A��-�
(��
�_�_�X�
&��
�_�_�X�
&��
�	6�6�2�	6��!�&�)�F��I�I�f�%�I�(��I�I�f�%�I�(��[�[��U�3�F��{�{�6�u�5�H�
	6�	6�	���f�h�/�	6�	6��	6�	6�s%�C1�A C%�>C1�%C.	�*C1�1C:N)6rrrr�r(r*r3�td�
skip_if_nor9r>rJrD�mark�parametrize�
path_typesrS�strr
rr`rersr�r�rr��FileNotFoundError�read_fwfr��read_feather�OSErrorr��
read_stata�read_sas�	read_json�read_pickler�r�r�r�r�r��
to_parquetr�r�r�r��
read_tabler�r��to_datetimer�r�rrrrr:s���
�E�=�=�<��R�]�]�9��6��6�'�
E��[�[���[�*�5�'�6�'��[�[���[�3��d�*C�D�K�E�K�#�2�. �"
D��[�[���-�
�[�[�$� 1�5�9�
�[�[�$� 1�5�9�
�]�]�F�$5�v�>�
�_�_�i��)�<�
�[�[�(�$5�t�<�
�]�]�D�"3�U�;�
�[�[�$� 1�:�>�
�\�\�4�!2�F�;�
�^�^�T�#4�h�?�
	
�
��
��0�[�[���-�
�\�\�
 �
 �$���7�
�\�\�
!�
!�4��&�9�
�\�\�
"�
"�F�G�V�<�
�\�\�
$�
$�i��)�D�
�\�\�
$�
$�i��)�D�
�\�\�
"�
"�D�'�5�9�
�\�\�
!�
!�4��&�9�
�\�\�
#�
#�T�7�H�=�		
��&��&��[�[���-�
�[�[�$� 1�5�9�
�]�]�D�"3�U�;�
�[�[�$� 1�5�9�
�]�]�F�$5�v�>�
�_�_�i��)�<�
�[�[�(�$5�t�<�
�]�]�D�"3�U�;�
�[�[�$� 1�:�>�
�\�\�4�!2�F�;�
�^�^�T�#4�h�?�	
�����8�[�[����
�[�[�$� A�B�
�]�]�D�"C�D�����G�
�
�]�]�F�$I�J�����B�
�����D�
�
�]�]�D�"L�M�
�[�[�$� G�H�
�\�\�4�!L�M�����E�
�-	
��>4�?�>4��[�[���,�
�r�4� �
�(�J�/��<�
�2�y�)�
��D�!�
��D�!�
��T�"�
�"�d�#�
�,�����7I�(J�K�T�R�		
��.��.�40rrc��|dddd�S)Nr�rpr�z
test_mmap.csvr)r�s r�	mmap_filer
�s���D�&�%��9�9rc��eZdZd�Zd�Zd�Zd�Zejjdddg�ejjdd	d
g�d���Z
y)
�TestMMapWrapperc���td�}d�|_t�r	d}t}nd}tj
}t
j||��5tj|d�ddd�t|d��5}	ddd�d	}t
jt|��5tjd�ddd�y#1swY�]xYw#1swY�RxYw#1swYyxYw)
NzI am not a filec��y)N���rrrrr�z;TestMMapWrapper.test_constructor_bad_file.<locals>.<lambda>�s�rzThe parameter is incorrectz
[Errno 22]r�Trl��encodingzI/O operation on closed file)r�filenorr�mmap�errorrDr�r �_maybe_memory_maprH�
ValueError)rr
�non_file�msg�err�targets      r�test_constructor_bad_filez)TestMMapWrapper.test_constructor_bad_file�s����-�.��$���� �.�C��C��C��*�*�C�
�]�]�3�c�
*�	3��"�"�8�T�2�	3��)�g�
.�	�&��	�-��
�]�]�:�S�
1�	1��"�"�6�4�0�	1�	1�	3�	3��	�	��	1�	1�s$�C�<C�#C�C�C�C$c��t|d��5}|j�}tj|ddd��5}|j}t|jjtj�sJ�|D]0}t|�}|j�|j�k(r�0J�tjtd��5t|�ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw)NrlrrbT)rj�
memory_mapz^$r�)
rH�	readlinesr r[r\�
isinstance�bufferrr��striprDr��
StopIteration)rr
r�lines�wrappers�wrapper�line�	next_lines        r�	test_nextzTestMMapWrapper.test_next�s���
�)�g�
.�	"�&��$�$�&�E������T�d��
"��"�/�/��!�'�.�.�"7�"7����C�C�C�!�=�D� $�W�
�I�$�?�?�,��
�
��<�<�<�=��]�]�=��>�"���M�"�
"�	"�	"�"�"��
"�
"��	"�	"�sA�*D�A.C6�'C6�C*�C6�D�*C3�/C6�6C?	�;D�Dc�4�tj�5}tjdt	j
d�j
d�ztjtd�t��tjtd�D�cgc]}d|����	c}t����}|j|�tjtd	�
�5tj|d��ddd�ddd�ycc}w#1swY�xYw#1swYyxYw)
N皙�����?�x��r��ABCD��dtyper0�i-��columns�indexzUnknown enginer��pyt)r�)rFrGrr��np�arange�reshape�Index�list�object�ranger�rDr�rr��rr�ir�s    r�test_unknown_enginez#TestMMapWrapper.test_unknown_engine�s���
�_�_�
�	0�$�����b�i�i��n�,�,�W�5�5�����f��V�<��h�h�%��)�<�Q�"�Q�C��<�F�K��B�

�I�I�d�O����z�1A�B�
0����D��/�
0�	0�	0�� =�
0�
0��	0�	0�s6�A5D�
C=�>D�D�,D�=D�D	�D�Dc��tj�5}tjdt	j
d�j
d�ztjtd�t��tjtd�D�cgc]}d|����	c}t����}|j|d	�
�tj|tj|d���d
d
d
�y
cc}w#1swYy
xYw)z\
        'encoding' shouldn't be passed to 'open' in binary mode.

        GH 35058
        r-r.r/r1r2r0r4r5zw+brBr��	index_colN)rFrGrr�r9r:r;r<r=r>r?r�r�r�r@s    r�test_binary_modez TestMMapWrapper.test_binary_mode�s����_�_�
�	F�$�����b�i�i��n�,�,�W�5�5�����f��V�<��h�h�%��)�<�Q�"�Q�C��<�F�K��B�

�I�I�d��I�'��!�!�"�b�k�k�$�!�&D�E�	F�	F�� =�		F�	F�s�A5C4�
C/�AC4�/C4�4C=rzutf-16zutf-32�compression_�bz2�xzc��tjdtjd�j	d�ztj
t
d�t��tj
td�D�cgc]}d|����	c}t����}tj�5}tjt�5|j|||�	�d
d
d
�d}tjt |��5tj"|||�	�d
d
d
�d
d
d
�y
cc}w#1swY�UxYw#1swY�#xYw#1swYy
xYw)
z�
        bz2 and xz do not write the byte order mark (BOM) for utf-16/32.

        https://stackoverflow.com/questions/55171439

        GH 35681
        r-r.r/r1r2r0r4r5)rNrNzHUTF-\d+ stream does not start with BOM|'utf-\d+' codec can't decode byter�)rr�r9r:r;r<r=r>r?rFrG�assert_produces_warning�UnicodeWarningr�rDr��UnicodeErrorr�)rrrGrAr�rrs       r�test_warning_missing_utf_bomz,TestMMapWrapper.test_warning_missing_utf_bom�s���\�\��"�)�)�C�.�(�(��1�1��H�H�T�&�\��8��(�(�e�B�i�8��b���H�8��G�
��
�_�_�
�
	O�$��+�+�N�;�
M��	�	�$�L�8�	�L�
M�
5�
����|�3�7�
O����D�l�X�N�
O�
	O�
	O��9�
M�
M��
O�
O��
	O�
	O�sB�5D%�'E�D*�%E�;D6�E�*D3	�/E�6D?	�;E�EN)rrrrr+rBrFrDr�r�rNrrrrr�s`��1�,"�"	0�
F��[�[���Z�(�H�)=�>��[�[���^�e�T�]�;�O�<�?�Orrc��tjd�sJ�tjd�sJ�tjd�rJ�tjd�rJ�tjd�rJ�tjd�rJ�tjd�rJ�tjd�rJ�tjd	�sJ�y)
Nzgcs://pandas/somethingelse.comzgs://pandas/somethingelse.comzhttp://pandas/somethingelse.comzrandom:pandas/somethingelse.comz/local/pathzrelative/local/pathzthis is not fsspec://urlz({'url': 'gs://pandas/somethingelse.com'}z#RFC-3986+compliant.spec://something)r �
is_fsspec_urlrrr�test_is_fsspec_urlrQ�s������>�?�?�?����=�>�>�>��!�!�"C�D�D�D��!�!�"C�D�D�D��!�!�-�0�0�0��!�!�"7�8�8�8��!�!�"<�=�=�=��!�!�"L�M�M�M����C�D�D�Drrrl�formatr�r�c���tjdtjd�j	d�ztj
t
d�t��tj
td�D�cgc]}d|����	c}t����}tj�5}tj|d	|�
�5}t|d|���|�ddd�tj|d|�
�5}|d
k(rtj|d��}ntj|�}ddd�ddd�tj |�ycc}w#1swY��xYw#1swY�9xYw#1swY�=xYw)Nr-r.r/r1r2r0r4r5rV)rCr�to_rbr�rrD)rr�r9r:r;r<r=r>r?rFrG�codecsrHr�r�rr�)rrRrArRrr\r�s       r�test_codecs_encodingrV�s&���|�|��b�i�i��n�$�$�W�-�-�����f��V�4��h�h�%��)�4�Q�"�Q�C��4�F�C��H�

���	�*�d�
�[�[��C�(�
;�	6�v�-�G�H��F�8�n�-�f�5�	6�
�[�[��C�(�
;�	*�v�����[�[��1�5���\�\�&�)��		*�*����(�B�'��5�	6�	6��	*�	*��*�*�sB�5E�'E-�E� E-�63E!�)E-�E	�E-�!E*	�&E-�-E6c�D�tjdtjd�j	d�ztj
t
d�t��tj
td�D�cgc]}d|����	c}t����}tj�5}t|d	�5}tjd
�|�5}|j|�ddd�ddd�t|d�5}tjd
�|�5}tj |d�
�}ddd�ddd�ddd�tj"|�ycc}w#1swY��xYw#1swY��xYw#1swY�MxYw#1swY�QxYw#1swY�UxYw)Nr-r.r/r1r2r0r4r5rArlrhrrD)rr�r9r:r;r<r=r>r?rFrGrHrU�	getwriterr��	getreaderr�r�)rArRrr\�encodedr�s      r�test_codecs_get_writer_readerr[sR���|�|��b�i�i��n�$�$�W�-�-�����f��V�4��h�h�%��)�4�Q�"�Q�C��4�F�C��H�

���	�7�d�
�$��
�	)��*��!�!�'�*�6�2�
)�g�����(�
)�	)��$��
�	7��*��!�!�'�*�6�2�
7�g��[�[��A�6��
7�	7�	7����(�B�'��5�
)�
)��	)�	)��
7�
7��	7�	7��	7�7�sr�5E!�'
F�4E2�E&�"E2�*F�>F
�E>�2F
�:F�&E/�+E2�2E;	�7F�>F�F
�
F	�F�Fzio_class,mode,msg�tz*a bytes-like object is required, not 'str'r}z%string argument expected, got 'bytes'c��tjdtjd�j	d�ztj
t
d�t��tj
td�D�cgc]}d|����	c}t����}|�5}tjt|�	�5|j|d
|����ddd�ddd�ycc}w#1swY�xYw#1swYyxYw)Nr-r.r/r1r2r0r4r5r�rVrB)
rr�r9r:r;r<r=r>r?rDr��	TypeErrorr�)�io_classrCrrArRr#s      r�test_explicit_encodingr`$s����|�|��b�i�i��n�$�$�W�-�-�����f��V�4��h�h�%��)�4�Q�"�Q�C��4�F�C��H�

��5�v�
�]�]�9�C�
0�	5��O�O�F�1�T�F��O�4�	5�5�5��5�	5�	5��5�5�s*�5C�C/�6C#�
C/�#C,	�(C/�/C8�encoding_errors)N�strict�replacec��d}d}|dk(r0d|zdz|dzzdz|z}ttjd��}n2d	|dzzd
z|zdz|zdz}ttjd
��}t	j
�5}t
|�}|j|�|dk7r/tjt|��5|||��ddd�nP|||��}|j|��}	tj|	|	gi|	dzg��}
t	j||
�ddd�y#1swY�xYw#1swYyxYw)Nz'utf-8' codec can't decode byte��r��,�
r�rrDs{"s": {"s":"s"}}r7)�orientrcr�)ra��errors)r7)rrr�rrFrGr�write_bytesrDr��UnicodeDecodeError�decoder�r�)rarRr�bad_encoding�contentr�r�filer��decodedrRs           r�test_encoding_errorsrr9sg��,�C��L�
�����%��-��q�0@�@�4�G�,�V�������2��
��Q��
��
��
��	
�
�
��

�	�����g�6��	���	�0�d��D�z������!��i�'����1��=�
>��t�_�=�
>�
>���o�>�B�"�)�)��)�A�G��|�|�W�w�i�$8��1��
�N�H��!�!�"�h�/�0�0�

>�
>��0�0�s%�=D6�=D*�AD6�*D3	�/D6�6D?c���tj�5}tjtd��5tj|dd��ddd�ddd�y#1swY�xYw#1swYyxYw)Nzunknown error handler namer�rV�badri)rFrGrDr��LookupErrorr r[r
s r�test_bad_encdoing_errorsrv\s\��	���	�5�d�
�]�]�;�.J�
K�	5��O�O�D�#�e�4�	5�5�5�	5�	5��5�5�s"�A'�A�
A'�A$	� A'�'A0c���tjtd��5}tjd�|j
t
jk(sJ�	ddd�y#1swYyxYw)Nz\[Errno 2\]r��doesnt_exist)rDr�rrr��errno�ENOENT)rs r�test_errno_attributer{csJ��	���(��	@�)�C�
���N�#��y�y�E�L�L�(�(�(�)�)�)�s�5A�A$c���tjtd��5t�5}t	j
|dd��ddd�ddd�y#1swY�xYw#1swYyxYw)Nrr�rhT)r )rDr�rrr r[)r#s r�test_fail_mmapr}jsW��	���+�8�	<�;�
�Y�	;�&��O�O�F�D�T�:�	;�;�;�	;�	;��;�;�s"�A�A�A�A	�A�A&c�L�Gd�d�}tjtd��5t�5}t	j
|d�5}|jj|��ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw)Nc��eZdZd�Zy)�&test_close_on_error.<locals>.TestErrorc��td��)N�test)rrs r�closez,test_close_on_error.<locals>.TestError.closess���&�/�!rN)rrrr�rrr�	TestErrorr�rs��	"rr�r�r�rh)rDr�rrr r[�created_handles�append)r�r#r_s   r�test_close_on_errorr�ps���"�"�
���w�f�	-�<�
�Y�	<�&������.�
<�'��'�'�.�.�y�{�;�
<�	<�<�<�
<�
<��	<�	<��<�<�s:�B�B�!B�)B�1B�B�B�B	�B�B#r�c�n�t�5}tj||�ddd�y#1swYyxYwr)rr��dump)r�r#s  r�test_pickle_readerr�|s.�� 
��$�f����F�F�#�$�$�$�s�+�4)HrrUry�	functoolsrr�rrrrr"�pathlibrr�rW�numpyr9rD�
pandas.compatr�pandas.util._test_decorators�util�_test_decoratorsr��pandasr�pandas._testing�_testingrF�pandas.io.common�commonr r��filterwarnings�
pytestmarkr
rr��py.pathrr6r��ImportErrorrr5�dirname�__file__r�r�fixturer
rrQr�rVr[r`rrrvr{r}r�r�rr�rr�rrrrr�rrr�<module>r�sP��������
�	��
���
�-�)�)�����
�[�[�
'�
'�C��
�
���<��
&�
�	�*����i� �
�w�w���r�w�w���x�0�1��P0�P0�f
���:��:�[O�[O�|E�������d�G�_�5�������E�6�?�3�(�4�6�(�$(�"������	�#�C�D�	�3�?�@���5��5������*�,G�H�������E�6�?�3�0�4�I�0�B5�)�;�	<�������
���
���
�
�
�
���
���
�
�
�
���
���
���
�
�$�
�$��o�	��	�s�I�I�I

Youez - 2016 - github.com/yon3zu
LinuXploit