math_opt: disable failing python tests

This commit is contained in:
Corentin Le Molgat
2024-01-16 17:04:47 +01:00
parent 60cc715299
commit b2a6fc0949
3 changed files with 6 additions and 2 deletions

View File

@@ -40,7 +40,9 @@ target_link_libraries(math_opt_pybind11 PRIVATE
add_library(${PROJECT_NAMESPACE}::math_opt_pybind11 ALIAS math_opt_pybind11)
if(BUILD_TESTING)
file(GLOB PYTHON_SRCS "solver_test.py")
file(GLOB PYTHON_SRCS "*_test.py")
list(FILTER PYTHON_SRCS EXCLUDE REGEX ".*/solver_gurobi_test.py") # need gurobi
list(FILTER PYTHON_SRCS EXCLUDE REGEX ".*/solver_test.py") # need google3.testing.pybase.parameterized
foreach(FILE_NAME IN LISTS PYTHON_SRCS)
add_python_test(
FILE_NAME ${FILE_NAME}

View File

@@ -15,7 +15,6 @@
import threading
from typing import Callable, Optional, Sequence
import unittest
from google3.testing.pybase import parameterized
from pybind11_abseil.status import StatusNotOk
from ortools.math_opt import callback_pb2
from ortools.math_opt import model_parameters_pb2

View File

@@ -17,6 +17,9 @@ endif()
if(BUILD_PYTHON_SAMPLES)
file(GLOB PYTHON_SRCS "*.py")
list(FILTER PYTHON_SRCS EXCLUDE REGEX ".*/remote_solve.py") # need ortools.math_opt.python.ipc
list(FILTER PYTHON_SRCS EXCLUDE REGEX ".*/tsp.py") # need gurobi
list(FILTER PYTHON_SRCS EXCLUDE REGEX ".*/facility_lp_benders.py") # too long
foreach(SAMPLE IN LISTS PYTHON_SRCS)
add_python_sample(
FILE_NAME ${SAMPLE}