Skip to content

Commit

Permalink
RFC: Change assert_allclose to assert_array_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
QBatista committed Sep 30, 2017
1 parent 917b473 commit cf32a4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions quantecon/game_theory/tests/test_mclennan_tourky.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"""
import numpy as np
from numpy.testing import assert_allclose
from numpy.testing import assert_array_equal
from nose.tools import ok_, raises
from quantecon.game_theory import Player, NormalFormGame, mclennan_tourky
from quantecon.game_theory.mclennan_tourky import _best_response_selection, \
_flatten_action_profile, \
_is_epsilon_nash
from quantecon.game_theory.mclennan_tourky import (
_best_response_selection, _flatten_action_profile, _is_epsilon_nash
)


class TestMclennanTourky():
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_flatten_action_profile():
unflattened_actions = [[1/3, 1/3, 1/3], [1/2, 1/2]]
flattened_actions = [1/3, 1/3, 1/3, 1/2, 1/2]
test_obj = _flatten_action_profile(unflattened_actions, [0, 3, 5])
assert_allclose(test_obj, flattened_actions)
assert_array_equal(test_obj, flattened_actions)


def test_best_response_selection_no_indptr():
Expand All @@ -152,7 +152,7 @@ def test_best_response_selection_no_indptr():
test_obj = _best_response_selection([1/3, 1/3, 1/3, 1/2,1/2], g)
expected_output = np.array([0., 1., 0., 0., 1.])

assert_allclose(test_obj, expected_output)
assert_array_equal(test_obj, expected_output)


if __name__ == '__main__':
Expand Down

0 comments on commit cf32a4b

Please sign in to comment.