From 66044420c32937a34b2300cc55756c82e6a9ef56 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 May 2016 12:59:48 +0200 Subject: [PATCH] GenericBackend._test_add_linear_constraint_vector: Make test suitable for InteractiveLPBackend --- src/sage/numerical/backends/generic_backend.pyx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index ddd9bdb1f07..6d60c4e6a29 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -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):