Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
GenericBackend._test_add_linear_constraint_vector: Make test suitable…
Browse files Browse the repository at this point in the history
… for InteractiveLPBackend
  • Loading branch information
Matthias Koeppe committed May 24, 2016
1 parent f2d52f5 commit 6604442
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sage/numerical/backends/generic_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,12 @@ cdef class GenericBackend:
coeffs = ([0, vector([1, 2])], [1, vector([2, 3])])
upper = vector([5, 5])
lower = vector([0, 0])
p.add_linear_constraint_vector(2, coeffs, lower, upper, 'foo')
try:
p.add_linear_constraint_vector(2, coeffs, lower, upper, 'foo')
except NotImplementedError:
# Ranged constraints are not supported by InteractiveLPBackend
lower = None
p.add_linear_constraint_vector(2, coeffs, lower, upper, 'foo')
# FIXME: Tests here. Careful what we expect regarding ranged constraints with some solvers.

cpdef add_col(self, list indices, list coeffs):
Expand Down

0 comments on commit 6604442

Please sign in to comment.