]> gitweb.michael.orlitzky.com - dunshire.git/blobdiff - src/dunshire/games.py
Locally disable another pylint warning to get clean again.
[dunshire.git] / src / dunshire / games.py
index 10a5eee5b8f34832103f1a564f50150a93b22846..2cf23b25c9827199d7790a944f6ebf9aec76c188 100644 (file)
@@ -606,7 +606,8 @@ def _random_icecream_params():
     return (L, K, matrix(e1), matrix(e2))
 
 
-class SymmetricLinearGameTest(TestCase):
+# Tell pylint to shut up about the large number of methods.
+class SymmetricLinearGameTest(TestCase): # pylint: disable=R0904
     """
     Tests for the SymmetricLinearGame and Solution classes.
     """
@@ -849,9 +850,7 @@ class SymmetricLinearGameTest(TestCase):
         This test theoretically applies to the ice-cream cone as well,
         but we don't know how to make positive operators on that cone.
         """
-        (_, K, e1, e2) = _random_orthant_params()
-
-        # Ignore that L, we need a nonnegative one.
+        (K, e1, e2) = _random_orthant_params()[1:]
         L = _random_nonnegative_matrix(K.dimension())
 
         game = SymmetricLinearGame(L, K, e1, e2)
@@ -887,10 +886,7 @@ class SymmetricLinearGameTest(TestCase):
         """
         Test that a Lyapunov game on the nonnegative orthant works.
         """
-        (L, K, e1, e2) = _random_orthant_params()
-
-        # Ignore that L, we need a diagonal (Lyapunov-like) one.
-        # (And we don't need to transpose those.)
+        (K, e1, e2) = _random_orthant_params()[1:]
         L = _random_diagonal_matrix(K.dimension())
 
         self.assert_lyapunov_works(L, K, e1, e2)
@@ -900,10 +896,7 @@ class SymmetricLinearGameTest(TestCase):
         """
         Test that a Lyapunov game on the ice-cream cone works.
         """
-        (L, K, e1, e2) = _random_icecream_params()
-
-        # Ignore that L, we need a diagonal (Lyapunov-like) one.
-        # (And we don't need to transpose those.)
+        (K, e1, e2) = _random_icecream_params()[1:]
         L = _random_lyapunov_like_icecream(K.dimension())
 
         self.assert_lyapunov_works(L, K, e1, e2)