Skip to content

Commit

Permalink
Add test_normalformgame_payoff_profile_array_c_contiguous
Browse files Browse the repository at this point in the history
Test should fail
  • Loading branch information
oyamad committed Oct 20, 2016
1 parent 3e67fc6 commit af3e0ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions quantecon/game_theory/tests/test_normal_form_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,16 @@ def test_normalformgame_payoff_profile_array():
assert_array_equal(player_new.payoff_array, payoff_array)


def test_normalformgame_payoff_profile_array_c_contiguous():
nums_actions = (2, 3, 4)
shape = nums_actions + (len(nums_actions),)
payoff_profile_array = \
np.arange(np.prod(shape)).reshape(shape)
g = NormalFormGame(payoff_profile_array)
for player in g.players:
ok_(player.payoff_array.flags['C_CONTIGUOUS'])


# Trivial cases with one player #

class TestPlayer_0opponents:
Expand Down

0 comments on commit af3e0ec

Please sign in to comment.