Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
pchtsp committed Feb 20, 2025
1 parent 6605527 commit 76358a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pulp/tests/test_pulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ def test_continuous(self):

def test_intermediate_var(self):
prob = LpProblem(self._testMethodName, const.LpMinimize)
x_vars = {i: LpVariable(f"x{i}", lowBound=0, cat=LpContinuous) for i in range(3)}
x_vars = {
i: LpVariable(f"x{i}", lowBound=0, cat=LpContinuous) for i in range(3)
}
x = lpSum(x_vars[i] for i in range(3))
prob += x >= 2
prob += x <= 5
for elem in prob.constraints.values():
self.assertIn(elem.constant, [2, 5])
self.assertIn(elem.constant, [2, 5])

def test_continuous_max(self):
prob = LpProblem(self._testMethodName, const.LpMaximize)
Expand Down

0 comments on commit 76358a5

Please sign in to comment.