33For many solvers the tests simply ensure that calling the solver works, and then for some cases,
44checking the expected results on a very simple game.
55
6- Better test coverage is there for lp_solve, lcp_solve, and enumpoly_solve for behavior strategies.
6+ There is better test coverage for
7+ lp_solve, lcp_solve, and enumpoly_solve, all in behavior strategies.
78"""
89import typing
910
@@ -28,8 +29,9 @@ def test_enumpure_agent():
2829 assert len (gbt .nash .enumpure_solve (game , use_strategic = False ).equilibria ) == 0
2930
3031
31- def test_enummixed_strategy_double ():
32- """Test calls of enumeration of mixed strategy equilibria, floating-point."""
32+ def test_enummixed_double ():
33+ """Test calls of enumeration of mixed strategy equilibria for 2-player games, floating-point.
34+ """
3335 game = games .read_from_file ("poker.efg" )
3436 result = gbt .nash .enummixed_solve (game , rational = False )
3537 assert len (result .equilibria ) == 1
@@ -38,7 +40,7 @@ def test_enummixed_strategy_double():
3840
3941@pytest .mark .nash
4042@pytest .mark .nash_enummixed_strategy
41- def test_enummixed_strategy_rational ():
43+ def test_enummixed_rational ():
4244 """Test calls of enumeration of mixed strategy equilibria, rational precision."""
4345 game = games .read_from_file ("poker.efg" )
4446 result = gbt .nash .enummixed_solve (game , rational = True )
@@ -100,8 +102,8 @@ def test_enummixed_strategy_rational():
100102 [[["1/2" , "1/2" ]], [["2/5" , "3/5" ]], [["1/4" , "3/4" ]]],
101103 [[["2/5" , "3/5" ]], [["1/2" , "1/2" ]], [["1/3" , "2/3" ]]],
102104 ],
103- 2 ,
104- ), # 9 in total found by enumpoly
105+ 2 , # 9 in total found by enumpoly
106+ ),
105107 ],
106108)
107109def test_enumpoly_behavior_strategy_rational (
@@ -158,7 +160,7 @@ def test_lcp_mixed_strategy_rational():
158160 assert result .equilibria [0 ] == expected
159161
160162
161- def test_lcp_behavior_strategy_floating ():
163+ def test_lcp_behavior_strategy_double ():
162164 """Test calls of LCP for mixed behavior equilibria, floating-point."""
163165 game = games .read_from_file ("poker.efg" )
164166 result = gbt .nash .lcp_solve (game , use_strategic = False , rational = False )
@@ -258,7 +260,7 @@ def test_lp_mixed_strategy_rational():
258260 assert result .equilibria [0 ] == expected
259261
260262
261- def test_lp_behavior_strategy_floating ():
263+ def test_lp_behavior_strategy_double ():
262264 """Test calls of LP for mixed behavior equilibria, floating-point."""
263265 game = games .read_from_file ("poker.efg" )
264266 result = gbt .nash .lp_solve (game , use_strategic = False , rational = False )
0 commit comments