3
���h�G � @ sR d dl Z d dlmZ d dlZd dlmZmZmZm Z m
Z
dd� ZG dd� d�ZdS )� N)�Decimal)�assert_�assert_almost_equal�assert_allclose�assert_equal�
assert_raisesc s � fdd�}|S )Nc sJ t jdd��4}t jdtd� � | |� ttdd� |D ��� W d Q R X d S )NT)�record�always)�categoryc s s | ]}|j tkV qd S )N)r
�DeprecationWarning)�.0�w� r �?/tmp/pip-build-5_djhm0z/numpy/numpy/lib/tests/test_financial.py� <genexpr> s z6filter_deprecation.<locals>.newfunc.<locals>.<genexpr>)�warnings�catch_warnings�filterwarningsr r �all)�args�kwargs�ws)�funcr r �newfunc s
z#filter_deprecation.<locals>.newfuncr )r r r )r r �filter_deprecation
s r c @ sD e Zd Zedd� �Zedd� �Zedd� �Zedd� �Zed d
� �Zedd� �Z ed
d� �Z
edd� �Zedd� �Zedd� �Z
edd� �Zedd� �Zedd� �Zedd� �Zedd� �Zedd � �Zed!d"� �Zed#d$� �Zed%d&� �Zed'd(� �Zed)d*� �Zed+d,� �Zed-d.� �Zed/d0� �Zed1d2� �Zed3d4� �Zd5S )6�
TestFinancialc C s6 t jd ddddg�}tt jt j|�|�dddd� d S )
Ni@� i� i@ i�. i0u r g�����|�=)ZatolZrtoli�c��)�np�arrayr �npv�irr)�selfZ cashflowsr r r �test_npv_irr_congruence s z%TestFinancial.test_npv_irr_congruencec C s t tjdddd�dd� d S )N�
r i�
i' |