Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pandas/tests/extension/base/__pycache__/reduce.cpython-37.pyc
Назад
B �5�g� � @ st d dl Z d dlZd dlZd dlmZ d dlmZ G dd� de�Z G dd� de �Z G dd� de �ZG d d � d e �ZdS )� N)�BaseExtensionTestsc @ s e Zd ZdZdd� ZdS )�BaseReduceTestszg Reduction specific tests. Generally these only make sense for numeric/boolean operations. c C s6 t ||�|d�}t |�d�|�|d�}t�||� d S )N)�skipnaZfloat64)�getattrZastype�tmZassert_almost_equal)�self�s�op_namer �result�expected� r �X/home/digitalm-up/venv/lib/python3.7/site-packages/pandas/tests/extension/base/reduce.py�check_reduce s zBaseReduceTests.check_reduceN)�__name__� __module__�__qualname__�__doc__r r r r r r s r c @ sD e Zd ZdZej�dddg�dd� �Zej�dddg�dd� �Zd S ) �BaseNoReduceTestszwe don't define any reductionsr TFc C s@ |}t �|�}d}tjt|d�� t||�|d� W d Q R X d S )Nzf[Cc]annot perform|Categorical is not ordered for operation|'Categorical' does not implement reduction|)�match)r )�pd�Series�pytest�raises� TypeErrorr )r �data�all_numeric_reductionsr r r �msgr r r �test_reduce_series_numeric s z,BaseNoReduceTests.test_reduce_series_numericc C s@ |}t �|�}d}tjt|d�� t||�|d� W d Q R X d S )Nzf[Cc]annot perform|Categorical is not ordered for operation|'Categorical' does not implement reduction|)r )r )r r r r r r )r r �all_boolean_reductionsr r r r r r r �test_reduce_series_boolean&