Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pandas/tests/io/__pycache__/test_pickle.cpython-37.pyc
Назад
B �5�gNJ � @ s� d Z ddlZddlZddlZddlmZ ddlZddlZddlZddlZddl m Z ddlZddlZddl mZmZmZ ddlZddlZddlZddlmZmZmZmZ ddlm mZ ddlZddlm Z m!Z!m"Z" ddl#m$Z% ddl&m'Z'm(Z( e� Z)ej*ej+�d �gZ,ej-d d�dd � �Z.d|dd�Z/dd� Z0dd� Z1dd� Z2dd� Z3dd� Z4dd� Z5dd� Z6dd� Z7ej8�9e:�Z;ej8�<e;d d!�Z=e�ej8�<e=d"d#��Z>ej-e>d$�d%d!� �Z?d&d'� Z@d(d)� ZAd*d+� ZBej+�Cd,ejDeAd-d.�ejDejEd/d.�ejDejejEejFd0�d1d.�ejDejejEd2d0�d3d.�ejDejejEd4d0�d5ej+jGe d6d7�d8�g�ej+�d9�d:d;� ��ZHd<d=� ZId>d?� ZJd@dA� ZKej-dBdC� �ZLG dDdE� dE�ZMG dFdG� dG�ZNej+�CdHdIgdJe dKdLdMg�fdNejO�PdKdLdMgdOdPdQgg�fg�dRdS� �ZQdTdU� ZRej+�CdVdWdXdYg�dZd[� �ZSe�Td\�d]d^� �ZUG d_d`� d`ejV�ZWdadb� ZXdcdd� ZYdedf� ZZdgdh� Z[ej+�Cdidjdkdie�dldmdm�dng�dodp� �Z\dqdr� Z]dsdt� Z^dudv� Z_ej+�Cdwej`ejFg�dxdy� �Zadzd{� ZbdS )}a< manage legacy pickle tests How to add pickle tests: 1. Install pandas version intended to output the pickle. 2. Execute "generate_legacy_storage_files.py" to create the pickle. $ python generate_legacy_storage_files.py <output_dir> pickle 3. Move the created pickle to "data/legacy_pickle/<version>" directory. � N)�partial)�Path)�catch_warnings�filterwarnings�simplefilter)�PY38� get_lzma_file�import_lzma�is_platform_little_endian)�Index�Series�period_range)�Day�MonthEndz1ignore:Timestamp.freq is deprecated:FutureWarning�module)�scopec C s2 ddl m} t� � tddtd� | � S Q R X d S )Nr )�create_pickle_data�ignorez The 'freq' argument in Timestamp)�category)Z-pandas.tests.io.generate_legacy_storage_filesr r r � FutureWarning)r � r �Q/home/digitalm-up/venv/lib/python3.7/site-packages/pandas/tests/io/test_pickle.py�current_pickle_dataA s r c C s� t |t�rt�|| � d S |�d�r6tj}|| |� n`|dkrv|tjkrX| tjkstt�q�| |ksdt�| j |j ks�t�n t td|� d�tj�}|| |� d S )NZsp_� timestampZassert_Z_equal)� isinstancer �tm�assert_index_equal� startswithZassert_equal�pdZNaT�AssertionError�freq�getattrZassert_almost_equal)�result�expected�typ�version� comparatorr r r �compare_elementQ s r'