diff --git a/quantecon/game_theory/game_generators/tests/test_bimatrix_generators.py b/quantecon/game_theory/game_generators/tests/test_bimatrix_generators.py index 9e048f6ba..33734ccaa 100644 --- a/quantecon/game_theory/game_generators/tests/test_bimatrix_generators.py +++ b/quantecon/game_theory/game_generators/tests/test_bimatrix_generators.py @@ -14,7 +14,7 @@ class TestBlottoGame: - def setup(self): + def setup_method(self): self.h, self.t = 4, 3 rho = 0.5 self.g = blotto_game(self.h, self.t, rho) @@ -38,7 +38,7 @@ def test_seed(self): class TestRankingGame: - def setup(self): + def setup_method(self): self.n = 100 self.g = ranking_game(self.n) @@ -85,7 +85,7 @@ def test_sgc_game(): class TestTournamentGame: - def setup(self): + def setup_method(self): self.n = 5 self.k = 3 self.m = comb(self.n, self.k, exact=True) @@ -116,7 +116,7 @@ def test_raises_value_error_too_large_inputs(self): class TestUnitVectorGame: - def setup(self): + def setup_method(self): self.n = 100 self.g = unit_vector_game(self.n) diff --git a/quantecon/game_theory/tests/test_lemke_howson.py b/quantecon/game_theory/tests/test_lemke_howson.py index ed58c8c58..ba6d16660 100644 --- a/quantecon/game_theory/tests/test_lemke_howson.py +++ b/quantecon/game_theory/tests/test_lemke_howson.py @@ -7,7 +7,7 @@ class TestLemkeHowson(): - def setup(self): + def setup_method(self): self.game_dicts = [] # From von Stengel 2007 in Algorithmic Game Theory @@ -30,7 +30,7 @@ def test_lemke_howson(self): class TestLemkeHowsonDegenerate(): - def setup(self): + def setup_method(self): self.game_dicts = [] # From von Stengel 2007 in Algorithmic Game Theory diff --git a/quantecon/game_theory/tests/test_mclennan_tourky.py b/quantecon/game_theory/tests/test_mclennan_tourky.py index 49b830034..329b3ed7d 100644 --- a/quantecon/game_theory/tests/test_mclennan_tourky.py +++ b/quantecon/game_theory/tests/test_mclennan_tourky.py @@ -10,7 +10,7 @@ class TestMclennanTourky(): - def setup(self): + def setup_method(self): def anti_coordination(N, v): payoff_array = np.empty((2,)*N) payoff_array[0, :] = 1 @@ -56,7 +56,7 @@ def test_pure_nash(self): class TestMclennanTourkyInvalidInputs(): - def setup(self): + def setup_method(self): self.bimatrix = [[(3, 3), (3, 2)], [(2, 2), (5, 6)], [(0, 3), (6, 1)]] @@ -73,7 +73,7 @@ def test_mclennan_tourky_invalid_init_length(self): class TestEpsilonNash(): - def setup(self): + def setup_method(self): def anti_coordination(N, v): payoff_array = np.empty((2,)*N) payoff_array[0, :] = 1 diff --git a/quantecon/game_theory/tests/test_normal_form_game.py b/quantecon/game_theory/tests/test_normal_form_game.py index 622099d4d..74c6af867 100644 --- a/quantecon/game_theory/tests/test_normal_form_game.py +++ b/quantecon/game_theory/tests/test_normal_form_game.py @@ -17,7 +17,7 @@ class TestPlayer_1opponent: """Test the methods of Player with one opponent player""" - def setup(self): + def setup_method(self): """Setup a Player instance""" coordination_game_matrix = [[4, 0], [3, 2]] self.player = Player(coordination_game_matrix) @@ -89,7 +89,7 @@ def test_dominated_actions(self): class TestPlayer_2opponents: """Test the methods of Player with two opponent players""" - def setup(self): + def setup_method(self): """Setup a Player instance""" payoffs_2opponents = [[[3, 6], [4, 2]], @@ -176,7 +176,7 @@ def test_player_corner_cases(): class TestNormalFormGame_Sym2p: """Test the methods of NormalFormGame with symmetric two players""" - def setup(self): + def setup_method(self): """Setup a NormalFormGame instance""" coordination_game_matrix = [[4, 0], [3, 2]] self.g = NormalFormGame(coordination_game_matrix) @@ -194,7 +194,7 @@ def test_is_nash_mixed(self): class TestNormalFormGame_Asym2p: """Test the methods of NormalFormGame with asymmetric two players""" - def setup(self): + def setup_method(self): """Setup a NormalFormGame instance""" self.BoS_bimatrix = np.array([[(3, 2), (1, 1)], [(0, 0), (2, 3)]]) @@ -234,7 +234,7 @@ def test_payoff_arrays(self): class TestNormalFormGame_3p: """Test the methods of NormalFormGame with three players""" - def setup(self): + def setup_method(self): """Setup a NormalFormGame instance""" payoffs_2opponents = [[[3, 6], [4, 2]], @@ -341,7 +341,7 @@ def test_normalformgame_payoff_profile_array_c_contiguous(): class TestPlayer_0opponents: """Test for trivial Player with no opponent player""" - def setup(self): + def setup_method(self): """Setup a Player instance""" self.payoffs = [0, 1, -1] self.player = Player(self.payoffs) @@ -386,7 +386,7 @@ def test_dominated_actions(self): class TestNormalFormGame_1p: """Test for trivial NormalFormGame with a single player""" - def setup(self): + def setup_method(self): """Setup a NormalFormGame instance""" data = [[0], [1], [1]] self.g = NormalFormGame(data) @@ -444,7 +444,7 @@ def test_normalformgame_setitem_1p(): # Trivial cases with one action # class TestPlayer_1action: - def setup(self): + def setup_method(self): """Setup a Player instance""" self.payoffs = [[0, 1]] self.player = Player(self.payoffs) diff --git a/quantecon/game_theory/tests/test_pure_nash.py b/quantecon/game_theory/tests/test_pure_nash.py index 4c3ac8b36..bdb5a231b 100644 --- a/quantecon/game_theory/tests/test_pure_nash.py +++ b/quantecon/game_theory/tests/test_pure_nash.py @@ -10,7 +10,7 @@ class TestPureNashBruteForce(): - def setup(self): + def setup_method(self): self.game_dicts = [] # Matching Pennies game with no pure nash equilibrium diff --git a/quantecon/game_theory/tests/test_repeated_game.py b/quantecon/game_theory/tests/test_repeated_game.py index 4f1cb3337..c732aa976 100644 --- a/quantecon/game_theory/tests/test_repeated_game.py +++ b/quantecon/game_theory/tests/test_repeated_game.py @@ -8,7 +8,7 @@ class TestAS(): - def setup(self): + def setup_method(self): self.game_dicts = [] # Example from Abreu and Sannikov (2014) diff --git a/quantecon/game_theory/tests/test_support_enumeration.py b/quantecon/game_theory/tests/test_support_enumeration.py index fe72ef80d..aa22aff83 100644 --- a/quantecon/game_theory/tests/test_support_enumeration.py +++ b/quantecon/game_theory/tests/test_support_enumeration.py @@ -29,7 +29,7 @@ def random_skew_sym(n, m=None, random_state=None): class TestSupportEnumeration(): - def setup(self): + def setup_method(self): self.game_dicts = [] # From von Stengel 2007 in Algorithmic Game Theory diff --git a/quantecon/game_theory/tests/test_vertex_enumeration.py b/quantecon/game_theory/tests/test_vertex_enumeration.py index 51dc8dfad..1f8cbabfb 100644 --- a/quantecon/game_theory/tests/test_vertex_enumeration.py +++ b/quantecon/game_theory/tests/test_vertex_enumeration.py @@ -10,7 +10,7 @@ class TestVertexEnumeration: - def setup(self): + def setup_method(self): self.game_dicts = [] # From von Stengel 2007 in Algorithmic Game Theory @@ -71,7 +71,7 @@ def test_vertex_enumeration_invalid_g(): class TestBestResponsePolytope: - def setup(self): + def setup_method(self): # From von Stengel 2007 in Algorithmic Game Theory bimatrix = [[(3, 3), (3, 2)], [(2, 2), (5, 6)], diff --git a/quantecon/markov/tests/test_approximation.py b/quantecon/markov/tests/test_approximation.py index f97aa4809..b1d33d4f6 100644 --- a/quantecon/markov/tests/test_approximation.py +++ b/quantecon/markov/tests/test_approximation.py @@ -11,7 +11,7 @@ class TestTauchen: - def setup(self): + def setup_method(self): self.rho, self.sigma_u = np.random.rand(2) self.n = np.random.randint(3, 25) self.m = np.random.randint(5) @@ -54,7 +54,7 @@ def test_states_sum_0(self): class TestRouwenhorst: - def setup(self): + def setup_method(self): self.rho, self.sigma = np.random.uniform(0, 1, size=2) self.n = np.random.randint(3, 26) self.ybar = np.random.randint(0, 11) diff --git a/quantecon/markov/tests/test_core.py b/quantecon/markov/tests/test_core.py index 926f879af..80fb756ba 100644 --- a/quantecon/markov/tests/test_core.py +++ b/quantecon/markov/tests/test_core.py @@ -191,7 +191,7 @@ class Test_markovchain_stationary_distributions_KMRMarkovMatrix2(): p = 1/3 TOL = 1e-2 - def setup(self): + def setup_method(self): """ Setup a KMRMarkovMatrix and Compute Stationary Values """ self.P = KMR_Markov_matrix_sequential(self.N, self.p, self.epsilon) self.mc = MarkovChain(self.P) @@ -409,7 +409,7 @@ def test_mc_sample_path_lln(): class TestMCStateValues: - def setup(self): + def setup_method(self): state_values = [[0, 1], [2, 3], [4, 5]] # Pass python list self.state_values = np.array(state_values) diff --git a/quantecon/markov/tests/test_ddp.py b/quantecon/markov/tests/test_ddp.py index 51fbb851b..95cd7b848 100644 --- a/quantecon/markov/tests/test_ddp.py +++ b/quantecon/markov/tests/test_ddp.py @@ -11,7 +11,7 @@ class TestDiscreteDP: - def setup(self): + def setup_method(self): # From Puterman 2005, Section 3.1 beta = 0.95 @@ -194,7 +194,7 @@ def test_ddp_sorting(): class TestFiniteHorizon: - def setup(self): + def setup_method(self): # From Puterman 2005, Section 3.2, Section 4.6.1 # "single-product stochastic inventory control" s_indices = [0, 0, 0, 0, 1, 1, 1, 2, 2, 3] diff --git a/quantecon/markov/tests/test_random.py b/quantecon/markov/tests/test_random.py index 3d3a439d4..9f31b3517 100644 --- a/quantecon/markov/tests/test_random.py +++ b/quantecon/markov/tests/test_random.py @@ -89,7 +89,7 @@ def test_random_stochastic_matrix_k_1(): class TestRandomDiscreteDP: - def setup(self): + def setup_method(self): self.num_states, self.num_actions = 5, 4 self.num_sa = self.num_states * self.num_actions self.k = 3 diff --git a/quantecon/random/tests/test_utilities.py b/quantecon/random/tests/test_utilities.py index 6649f5fba..16ddece0f 100644 --- a/quantecon/random/tests/test_utilities.py +++ b/quantecon/random/tests/test_utilities.py @@ -17,7 +17,7 @@ # probvec # class TestProbvec: - def setup(self): + def setup_method(self): self.m, self.k = 2, 3 # m vectors of dimension k seed = 1234 @@ -68,7 +68,7 @@ def test_sample_without_replacement_value_error(): # draw # class TestDraw: - def setup(self): + def setup_method(self): self.pmf = np.array([0.4, 0.1, 0.5]) self.cdf = np.cumsum(self.pmf) self.n = len(self.pmf) diff --git a/quantecon/tests/test_arma.py b/quantecon/tests/test_arma.py index dfe7c3cbd..51183e948 100644 --- a/quantecon/tests/test_arma.py +++ b/quantecon/tests/test_arma.py @@ -9,7 +9,7 @@ class TestARMA(): - def setup(self): + def setup_method(self): # Initial Values phi = np.array([.95, -.4, -.4]) theta = np.zeros(3) diff --git a/quantecon/tests/test_compute_fp.py b/quantecon/tests/test_compute_fp.py index 94315ad0c..d48325e9a 100644 --- a/quantecon/tests/test_compute_fp.py +++ b/quantecon/tests/test_compute_fp.py @@ -17,7 +17,7 @@ class TestFPLogisticEquation(): @classmethod - def setup(cls): + def setup_method(cls): cls.mu_1 = 0.2 # 0 is unique fixed point forall x_0 \in [0, 1] # (4mu - 1)/(4mu) is a fixed point forall x_0 \in [0, 1] @@ -87,7 +87,7 @@ def test_imitation_game_method(self): class TestComputeFPContraction(): - def setup(self): + def setup_method(self): self.coeff = 0.5 self.methods = ['iteration', 'imitation_game'] diff --git a/quantecon/tests/test_discrete_rv.py b/quantecon/tests/test_discrete_rv.py index 80d44f0d2..050dc9edb 100644 --- a/quantecon/tests/test_discrete_rv.py +++ b/quantecon/tests/test_discrete_rv.py @@ -12,7 +12,7 @@ class TestDiscreteRV: @classmethod - def setup(cls): + def setup_method(cls): x = np.random.rand(10) x /= x.sum() # make sure it sums to 1 diff --git a/quantecon/tests/test_distributions.py b/quantecon/tests/test_distributions.py index bd8a91c51..ecd3711e7 100644 --- a/quantecon/tests/test_distributions.py +++ b/quantecon/tests/test_distributions.py @@ -9,7 +9,7 @@ class TestBetaBinomial: - def setup(self): + def setup_method(self): self.n = 100 self.a = 5 self.b = 5 diff --git a/quantecon/tests/test_dle.py b/quantecon/tests/test_dle.py index 29f2553ae..f24ccb963 100644 --- a/quantecon/tests/test_dle.py +++ b/quantecon/tests/test_dle.py @@ -11,7 +11,7 @@ class TestDLE: - def setup(self): + def setup_method(self): """ Given LQ control is tested we will test the transformation to alter the problem into a form suitable to solve using LQ diff --git a/quantecon/tests/test_ecdf.py b/quantecon/tests/test_ecdf.py index 6dae10a1d..05eb39c3c 100644 --- a/quantecon/tests/test_ecdf.py +++ b/quantecon/tests/test_ecdf.py @@ -10,7 +10,7 @@ class TestECDF: @classmethod - def setup(cls): + def setup_method(cls): cls.obs = np.random.rand(40) # observations defining dist cls.ecdf = ECDF(cls.obs) diff --git a/quantecon/tests/test_estspec.py b/quantecon/tests/test_estspec.py index 8dbfe5da5..5a5553187 100644 --- a/quantecon/tests/test_estspec.py +++ b/quantecon/tests/test_estspec.py @@ -19,7 +19,7 @@ class PeriodogramBase: @classmethod - def setup(cls): + def setup_method(cls): if cls is PeriodogramBase: raise pytest.skip("Skip PeriodogramBase tests" + " it's a base class") @@ -47,10 +47,10 @@ def test_func_I(self): class TestPeriodogram(PeriodogramBase): @classmethod - def setup(cls): + def setup_method(cls): if cls is PeriodogramBase: raise pytest.skip("Skip BaseTest tests, it's a base class") - super(TestPeriodogram, cls).setup() + super(TestPeriodogram, cls).setup_method() cls.window_length = 7 cls.w_20, cls.Iw_20 = periodogram(x_20) cls.w_21, cls.Iw_21 = periodogram(x_21) @@ -60,10 +60,10 @@ def setup(cls): class TestArPeriodogram(PeriodogramBase): @classmethod - def setup(cls): + def setup_method(cls): if cls is PeriodogramBase: raise pytest.skip("Skip BaseTest tests, it's a base class") - super(TestArPeriodogram, cls).setup() + super(TestArPeriodogram, cls).setup_method() cls.window_length = 7 cls.w_20, cls.Iw_20 = ar_periodogram(x_20) cls.w_21, cls.Iw_21 = ar_periodogram(x_21) @@ -81,7 +81,7 @@ def test_func_Iw_shape_even_x(self): class TestSmooth: @classmethod - def setup(cls): + def setup_method(cls): cls.x_20 = np.random.rand(20) cls.x_21 = np.random.rand(21) cls.window_length = 7 diff --git a/quantecon/tests/test_graph_tools.py b/quantecon/tests/test_graph_tools.py index 26ea525ef..5c05a0917 100644 --- a/quantecon/tests/test_graph_tools.py +++ b/quantecon/tests/test_graph_tools.py @@ -128,7 +128,7 @@ def __init__(self): class TestDiGraph: """Test the methods in Digraph""" - def setup(self): + def setup_method(self): """Setup Digraph instances""" self.graphs = Graphs() for graph_dict in self.graphs.graph_dicts: @@ -295,7 +295,7 @@ def test_raises_non_homogeneous_node_labels(): class TestRandomTournamentGraph: - def setup(self): + def setup_method(self): n = 5 g = random_tournament_graph(n) self.adj_matrix = g.csgraph.toarray() diff --git a/quantecon/tests/test_gridtools.py b/quantecon/tests/test_gridtools.py index 553b92744..89c62cd52 100644 --- a/quantecon/tests/test_gridtools.py +++ b/quantecon/tests/test_gridtools.py @@ -153,7 +153,7 @@ def test_repeat(): class TestSimplexGrid: - def setup(self): + def setup_method(self): self.simplex_grid_3_4 = np.array([[0, 0, 4], [0, 1, 3], [0, 2, 2], diff --git a/quantecon/tests/test_kalman.py b/quantecon/tests/test_kalman.py index 605ef05e3..1a2cd84c8 100644 --- a/quantecon/tests/test_kalman.py +++ b/quantecon/tests/test_kalman.py @@ -10,7 +10,7 @@ class TestKalman: - def setup(self): + def setup_method(self): # Initial Values self.A = np.array([[.95, 0], [0., .95]]) self.C = np.eye(2) * np.sqrt(0.5) diff --git a/quantecon/tests/test_lqcontrol.py b/quantecon/tests/test_lqcontrol.py index 12b2a6dc0..1486f55c8 100644 --- a/quantecon/tests/test_lqcontrol.py +++ b/quantecon/tests/test_lqcontrol.py @@ -10,7 +10,7 @@ class TestLQControl: - def setup(self): + def setup_method(self): # Initial Values q = 1. r = 1. @@ -91,7 +91,7 @@ def test_stationary_mat(self): class TestLQMarkov: - def setup(self): + def setup_method(self): # Markov chain transition matrix Π = np.array([[0.8, 0.2], diff --git a/quantecon/tests/test_lss.py b/quantecon/tests/test_lss.py index 7d4d2106f..d1a4909d0 100644 --- a/quantecon/tests/test_lss.py +++ b/quantecon/tests/test_lss.py @@ -9,7 +9,7 @@ class TestLinearStateSpace: - def setup(self): + def setup_method(self): # Example 1 A = .95 C = .05 diff --git a/quantecon/tests/test_quad.py b/quantecon/tests/test_quad.py index f78641f98..9b12f7d83 100644 --- a/quantecon/tests/test_quad.py +++ b/quantecon/tests/test_quad.py @@ -87,7 +87,7 @@ class TestQuadrect: @classmethod - def setup(cls): + def setup_method(cls): ## Create Python Data for quadrect # Create the python data -- similar to notebook code kinds = ["trap", "simp", "lege", "N", "W", "H", "R"] @@ -229,7 +229,7 @@ def test_quadrect_2d_H2(self): class TestQnwcheb: @classmethod - def setup(cls): + def setup_method(cls): cls.x_cheb_1, cls.w_cheb_1 = qnwcheb(n, a, b) cls.x_cheb_3, cls.w_cheb_3 = qnwcheb(n_3, a_3, b_3) @@ -249,7 +249,7 @@ def test_qnwcheb_weights_3d(self): class TestQnwequiN: @classmethod - def setup(cls): + def setup_method(cls): cls.x_equiN_1, cls.w_equiN_1 = qnwequi(n, a, b, "N") cls.x_equiN_3, cls.w_equiN_3 = qnwequi(n_3, a_3, b_3, "N") @@ -269,7 +269,7 @@ def test_qnwequiN_weights_3d(self): class TestQnwequiW: @classmethod - def setup(cls): + def setup_method(cls): cls.x_equiW_1, cls.w_equiW_1 = qnwequi(n, a, b, "W") cls.x_equiW_3, cls.w_equiW_3 = qnwequi(n_3, a_3, b_3, "W") @@ -289,7 +289,7 @@ def test_qnwequiW_weights_3d(self): class TestQnwequiH: @classmethod - def setup(cls): + def setup_method(cls): cls.x_equiH_1, cls.w_equiH_1 = qnwequi(n, a, b, "H") cls.x_equiH_3, cls.w_equiH_3 = qnwequi(n_3, a_3, b_3, "H") @@ -309,7 +309,7 @@ def test_qnwequiH_weights_3d(self): class TestQnwequiR: @classmethod - def setup(cls): + def setup_method(cls): cls.x_equiR_1, cls.w_equiR_1 = qnwequi(n, a, b, "R", random_state=41) temp, cls.w_equiR_3 = qnwequi(n_3, a_3, b_3, "R", random_state=42) @@ -346,7 +346,7 @@ def test_qnwequiR_weights_3d(self): class TestQnwlege: @classmethod - def setup(cls): + def setup_method(cls): cls.x_lege_1, cls.w_lege_1 = qnwlege(n, a, b) cls.x_lege_3, cls.w_lege_3 = qnwlege(n_3, a_3, b_3) @@ -366,7 +366,7 @@ def test_qnwlege_weights_3d(self): class TestQnwnorm: @classmethod - def setup(cls): + def setup_method(cls): cls.x_norm_1, cls.w_norm_1 = qnwnorm(n, a, b) cls.x_norm_3, cls.w_norm_3 = qnwnorm(n_3, mu_3d, sigma2_3d) @@ -386,7 +386,7 @@ def test_qnwnorm_weights_3d(self): class TestQnwlogn: @classmethod - def setup(cls): + def setup_method(cls): cls.x_logn_1, cls.w_logn_1 = qnwlogn(n, a, b) cls.x_logn_3, cls.w_logn_3 = qnwlogn(n_3, mu_3d, sigma2_3d) @@ -406,7 +406,7 @@ def test_qnwlogn_weights_3d(self): class TestQnwsimp: @classmethod - def setup(cls): + def setup_method(cls): cls.x_simp_1, cls.w_simp_1 = qnwsimp(n, a, b) cls.x_simp_3, cls.w_simp_3 = qnwsimp(n_3, a_3, b_3) @@ -426,7 +426,7 @@ def test_qnwsimp_weights_3d(self): class TestQnwtrap: @classmethod - def setup(cls): + def setup_method(cls): cls.x_trap_1, cls.w_trap_1 = qnwtrap(n, a, b) cls.x_trap_3, cls.w_trap_3 = qnwtrap(n_3, a_3, b_3) @@ -446,7 +446,7 @@ def test_qnwtrap_weights_3d(self): class TestQnwunif: @classmethod - def setup(cls): + def setup_method(cls): cls.x_unif_1, cls.w_unif_1 = qnwunif(n, a, b) cls.x_unif_3, cls.w_unif_3 = qnwunif(n_3, a_3, b_3) @@ -466,7 +466,7 @@ def test_qnwunif_weights_3d(self): class TestQnwbeta: @classmethod - def setup(cls): + def setup_method(cls): cls.x_beta_1, cls.w_beta_1 = qnwbeta(n, b, b + 1.0) cls.x_beta_3, cls.w_beta_3 = qnwbeta(n_3, b_3, b_3 + 1.0) @@ -486,7 +486,7 @@ def test_qnwbeta_weights_3d(self): class TestQnwgamm: @classmethod - def setup(cls): + def setup_method(cls): cls.x_gamm_1, cls.w_gamm_1 = qnwgamma(n, b) cls.x_gamm_3, cls.w_gamm_3 = qnwgamma(n_3, b_3) diff --git a/quantecon/tests/test_rank_nullspace.py b/quantecon/tests/test_rank_nullspace.py index 8518a7431..9dffafad9 100644 --- a/quantecon/tests/test_rank_nullspace.py +++ b/quantecon/tests/test_rank_nullspace.py @@ -9,7 +9,7 @@ class TestRankNullspace: - def setup(self): + def setup_method(self): self.A1 = np.eye(6) self.A2 = np.array([[1., 0, 0], [0., 1., 0], [1., 1., 0.]]) self.A3 = np.zeros((3, 3)) diff --git a/quantecon/tests/test_robustlq.py b/quantecon/tests/test_robustlq.py index 7573c36c5..2e900328d 100644 --- a/quantecon/tests/test_robustlq.py +++ b/quantecon/tests/test_robustlq.py @@ -10,7 +10,7 @@ class TestRBLQControl: - def setup(self): + def setup_method(self): # Initial Values a_0 = 100 a_1 = 0.5 diff --git a/quantecon/util/tests/test_combinatorics.py b/quantecon/util/tests/test_combinatorics.py index 387c73822..c3bdc95d6 100644 --- a/quantecon/util/tests/test_combinatorics.py +++ b/quantecon/util/tests/test_combinatorics.py @@ -11,7 +11,7 @@ class TestKArray: - def setup(self): + def setup_method(self): self.k_arrays = np.array( [[0, 1, 2], [0, 1, 3], diff --git a/quantecon/util/tests/test_numba.py b/quantecon/util/tests/test_numba.py index 78a65409b..ef6dabac8 100644 --- a/quantecon/util/tests/test_numba.py +++ b/quantecon/util/tests/test_numba.py @@ -14,7 +14,7 @@ def numba_linalg_solve_orig(a, b): class TestNumbaLinalgSolve: - def setup(self): + def setup_method(self): self.dtypes = [np.float32, np.float64] self.a = np.array([[3, 2, 0], [1, -1, 0], [0, 5, 1]]) self.b_1dim = np.array([2, 4, -1]) @@ -49,7 +49,7 @@ def test_singular_a(self): class TestCombJit: - def setup(self): + def setup_method(self): self.MAX_INTP = np.iinfo(np.intp).max def test_comb(self): diff --git a/quantecon/util/tests/test_timing.py b/quantecon/util/tests/test_timing.py index 4c60fbf59..0a49d77a0 100644 --- a/quantecon/util/tests/test_timing.py +++ b/quantecon/util/tests/test_timing.py @@ -10,7 +10,7 @@ class TestTicTacToc: - def setup(self): + def setup_method(self): self.h = 0.1 self.digits = 10