Skip to content

Commit 725c0f1

Browse files
committed
bazel: export more math_opt py_test
1 parent 4fbd8a7 commit 725c0f1

File tree

4 files changed

+367
-1
lines changed

4 files changed

+367
-1
lines changed

ortools/math_opt/core/python/BUILD.bazel

+22
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
load("@pip_deps//:requirements.bzl", "requirement")
1415
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
16+
load("@rules_python//python:defs.bzl", "py_test")
1517

1618
package(default_visibility = ["//ortools/math_opt:__subpackages__"])
1719

@@ -57,3 +59,23 @@ pybind_extension(
5759
"@pybind11_protobuf//pybind11_protobuf:native_proto_caster",
5860
],
5961
)
62+
63+
py_test(
64+
name = "solver_test",
65+
size = "small",
66+
srcs = ["solver_test.py"],
67+
deps = [
68+
":solver",
69+
requirement("absl-py"),
70+
"//ortools/math_opt:callback_py_pb2",
71+
"//ortools/math_opt:model_parameters_py_pb2",
72+
"//ortools/math_opt:model_py_pb2",
73+
"//ortools/math_opt:model_update_py_pb2",
74+
"//ortools/math_opt:parameters_py_pb2",
75+
"//ortools/math_opt:result_py_pb2",
76+
"//ortools/math_opt/solvers:cp_sat_solver",
77+
"//ortools/math_opt/solvers:glop_solver",
78+
"//ortools/math_opt/solvers:gscip_solver",
79+
"@pybind11_abseil//pybind11_abseil:status",
80+
],
81+
)

ortools/math_opt/io/python/BUILD.bazel

+14
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14+
load("@pip_deps//:requirements.bzl", "requirement")
1415
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
16+
load("@rules_python//python:defs.bzl", "py_test")
1517

1618
package(default_visibility = ["//visibility:public"])
1719

@@ -30,3 +32,15 @@ pybind_extension(
3032
"@pybind11_protobuf//pybind11_protobuf:native_proto_caster",
3133
],
3234
)
35+
36+
py_test(
37+
name = "mps_converter_test",
38+
srcs = ["mps_converter_test.py"],
39+
deps = [
40+
":mps_converter",
41+
requirement("absl-py"),
42+
"//ortools/math_opt:model_py_pb2",
43+
"//ortools/math_opt/python:mathopt",
44+
"//ortools/math_opt/python/testing:compare_proto",
45+
],
46+
)

0 commit comments

Comments
 (0)