Skip to content

Commit

Permalink
FIX: Replace assert_allclose with eq_ for testing equality between sc…
Browse files Browse the repository at this point in the history
…alars
  • Loading branch information
QBatista committed Aug 11, 2017
1 parent 1d873ae commit e18d9b2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions quantecon/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""
import numpy as np
from numpy.testing import assert_allclose
from nose.tools import eq_
from math import sqrt
from quantecon.distributions import BetaBinomial

Expand All @@ -19,21 +20,21 @@ def setUp(self):
self.test_obj = BetaBinomial(self.n, self.a, self.b)

def test_init(self):
assert_allclose(self.n, self.test_obj.n)
assert_allclose(self.a, self.test_obj.a)
assert_allclose(self.b, self.test_obj.b)
eq_(self.n, self.test_obj.n)
eq_(self.a, self.test_obj.a)
eq_(self.b, self.test_obj.b)

def test_mean(self):
assert_allclose(50, self.test_obj.mean)
eq_(50, self.test_obj.mean)

def test_std(self):
assert_allclose(sqrt(250), self.test_obj.std)
eq_(sqrt(250), self.test_obj.std)

def test_var(self):
assert_allclose(250, self.test_obj.var)
eq_(250, self.test_obj.var)

def test_skew(self):
assert_allclose(0, self.test_obj.skew)
eq_(0, self.test_obj.skew)

def test_pdf(self):
self.n = 9
Expand Down

0 comments on commit e18d9b2

Please sign in to comment.