Skip to content

Commit

Permalink
[TOBESQUASHED] Remove unused declared F841 instead of adding noqa
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 3, 2019
1 parent ce80b3f commit c271260
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_seed(self):
@raises(ValueError)
def test_raises_value_error_too_large_inputs(self):
n, k = 100, 50
g = tournament_game(n, k) # noqa: F841
tournament_game(n, k)


class TestUnitVectorGame:
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_redraw(self):
@raises(ValueError)
def test_raises_value_error_avoid_pure_nash_n_1(self):
n = 1
g = unit_vector_game(n, avoid_pure_nash=True) # noqa: F841
unit_vector_game(n, avoid_pure_nash=True)


def test_payoff_range():
Expand Down
14 changes: 7 additions & 7 deletions quantecon/game_theory/tests/test_normal_form_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,43 +482,43 @@ def test_player_repr():

@raises(ValueError)
def test_player_zero_actions():
p = Player([[]]) # noqa: F841
Player([[]])


@raises(ValueError)
def test_normalformgame_invalid_input_players_shape_inconsistent():
p0 = Player(np.zeros((2, 3)))
p1 = Player(np.zeros((2, 3)))
g = NormalFormGame([p0, p1]) # noqa: F841
NormalFormGame([p0, p1])


@raises(ValueError)
def test_normalformgame_invalid_input_players_num_inconsistent():
p0 = Player(np.zeros((2, 2, 2)))
p1 = Player(np.zeros((2, 2, 2)))
g = NormalFormGame([p0, p1]) # noqa: F841
NormalFormGame([p0, p1])


@raises(ValueError)
def test_normalformgame_invalid_input_players_dtype_inconsistent():
p0 = Player(np.zeros((2, 2), dtype=int))
p1 = Player(np.zeros((2, 2), dtype=float))
g = NormalFormGame([p0, p1]) # noqa: F841
NormalFormGame([p0, p1])


@raises(ValueError)
def test_normalformgame_invalid_input_nosquare_matrix():
g = NormalFormGame(np.zeros((2, 3))) # noqa: F841
NormalFormGame(np.zeros((2, 3)))


@raises(ValueError)
def test_normalformgame_invalid_input_payoff_profiles():
g = NormalFormGame(np.zeros((2, 2, 1))) # noqa: F841
NormalFormGame(np.zeros((2, 2, 1)))


@raises(ValueError)
def test_normalformgame_zero_actions():
g = NormalFormGame((2, 0)) # noqa: F841
NormalFormGame((2, 0))


# Utility functions #
Expand Down
2 changes: 1 addition & 1 deletion quantecon/game_theory/tests/test_support_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_no_error_skew_sym(self):
n, m = 3, 2
seed = 7028
g = random_skew_sym(n, m, random_state=seed)
NEs = support_enumeration(g) # noqa: F841
support_enumeration(g)


@raises(TypeError)
Expand Down
2 changes: 1 addition & 1 deletion quantecon/markov/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def test_get_index():
@raises(ValueError)
def test_raises_value_error_non_2dim():
"""Test with non 2dim input"""
mc = MarkovChain(np.array([0.4, 0.6])) # noqa: F841
MarkovChain(np.array([0.4, 0.6]))


def test_raises_value_error_non_sym():
Expand Down
2 changes: 1 addition & 1 deletion quantecon/tests/test_compute_fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ def test_raises_value_error_nonpositive_max_iter():
f = lambda x: 0.5*x
init = 1.
max_iter = 0
fp = compute_fixed_point(f, init, max_iter=max_iter) # noqa: F841
compute_fixed_point(f, init, max_iter=max_iter)
2 changes: 1 addition & 1 deletion quantecon/tests/test_graph_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_node_labels_subgraph():
@raises(ValueError)
def test_raises_value_error_non_sym():
"""Test with non symmetric input"""
g = DiGraph(np.array([[0.4, 0.6]])) # noqa: F841
DiGraph(np.array([[0.4, 0.6]]))


def test_raises_non_homogeneous_node_labels():
Expand Down
4 changes: 2 additions & 2 deletions quantecon/tests/test_gridtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def test_mlinsplace():

from numpy import linspace

grid1 = mlinspace([-1, -1], [2, 3], [30, 50]) # noqa: F841
grid2 = cartesian([linspace(-1, 2, 30), linspace(-1, 3, 50)]) # noqa: F841
mlinspace([-1, -1], [2, 3], [30, 50])
cartesian([linspace(-1, 2, 30), linspace(-1, 3, 50)])

def test_tile():

Expand Down

0 comments on commit c271260

Please sign in to comment.