enable more python tests in cmake; add rule to run python examples with args in bazel

This commit is contained in:
Laurent Perron
2023-07-05 09:06:55 +02:00
parent 56a02116a8
commit 84e1ad7f0c
6 changed files with 97 additions and 7 deletions

View File

@@ -52,6 +52,19 @@ def code_sample_test_py(name):
srcs_version = "PY3",
)
def code_sample_test_arg_py(name, suffix, args, data):
native.py_test(
name = name + "_" + suffix + "_py_test",
size = "medium",
srcs = [name + ".py"],
main = name + ".py",
data = data,
args = args,
deps = PYTHON_DEPS,
python_version = "PY3",
srcs_version = "PY3",
)
def code_sample_py(name):
code_sample_compile_py(name)
code_sample_test_py(name)