We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3543608 commit 0781ae7Copy full SHA for 0781ae7
ortools/linear_solver/python/model_builder_test.py
@@ -1478,7 +1478,7 @@ def assertLinearExpressionAlmostEqual(
1478
) -> None:
1479
"""Test that the two linear expressions are almost equal."""
1480
self.assertEqual(len(expr1.variable_indices), len(expr2.variable_indices))
1481
- if expr1.variable_indices:
+ if len(expr1.variable_indices) > 0: # pylint: disable=g-explicit-length-test
1482
self.assertSequenceEqual(expr1.variable_indices, expr2.variable_indices)
1483
self.assertSequenceAlmostEqual(
1484
expr1.coefficients, expr2.coefficients, places=5
0 commit comments