관리-도구
편집 파일: test_errstate.cpython-37.pyc
B ��Fd4 � @ s^ d dl mZmZmZ d dlZd dlZd dlmZm Z m Z mZ G dd� de�Ze dkrZe � dS )� )�division�absolute_import�print_functionN)�TestCase�assert_�run_module_suite�decc @ s8 e Zd Ze�e�� dkd�dd� �Zdd� Zdd� Z d S ) �TestErrstateZarmv5telzSee gh-413.c C sz t jddd��b t �d� }t jdd�� t �|� W d Q R X yt �|� W n tk r` Y nX | �d� W d Q R X d S )N�raise�ignore)�all�under� )�invalidzDid not raise an invalid error)�np�errstate�arange�sqrt�FloatingPointError�fail)�self�a� r ��/builddir/build/BUILDROOT/alt-python37-numpy-1.13.3-8.el8.x86_64/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests/test_errstate.py�test_invalid s zTestErrstate.test_invalidc C sv t jddd��^ t �d� }t jdd�� |d W d Q R X y|d W n tk r\ Y nX | �d� W d Q R X d S )Nr r )r r r )�divider z"Did not raise divide by zero error)r r r r r )r r r r r �test_divide s zTestErrstate.test_dividec C sz dd� }t �� }t j|d��B tt �� |kd� t jd d�� tt �� d kd� W d Q R X W d Q R X tt �� |kd� d S )Nc W s t | � d S )N)�print)�argsr r r �foo( s z&TestErrstate.test_errcall.<locals>.foo)�callzcall is not foozcall is not Nonezcall is not olderrcall)r � geterrcallr r )r r Z olderrcallr r r �test_errcall'