mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00

* Revert "Revert "Bump pytest from 5.4.3 to 7.0.1""
This reverts commit ab10890e90
.
Signed-off-by: Riatre Foo <foo@riat.re>
* Fix missing test data files dependency in rllib/BUILD
See # 26334 and # 26517 for context.
Once this is in, it should be good to roll-forwrad again.
Signed-off-by: Riatre Foo <foo@riat.re>
* debug: run all tests
Signed-off-by: Riatre Foo <foo@riat.re>
* Revert "debug: run all tests"
This reverts commit 0c5e796b0eb437d64922f66749c61b0412486970.
Signed-off-by: Riatre Foo <foo@riat.re>
* fix new tests since last rebase
Signed-off-by: Riatre Foo <foo@riat.re>
50 lines
1.9 KiB
Python
50 lines
1.9 KiB
Python
load("@bazel_skylib//lib:paths.bzl", "paths")
|
|
|
|
# py_test_module_list creates a py_test target for each
|
|
# Python file in `files`
|
|
|
|
def py_test_module_list(files, size, deps, extra_srcs=[], name_suffix="", **kwargs):
|
|
for file in files:
|
|
# remove .py
|
|
name = paths.split_extension(file)[0] + name_suffix
|
|
if name == file:
|
|
basename = basename + "_test"
|
|
native.py_test(
|
|
name = name,
|
|
size = size,
|
|
main = file,
|
|
srcs = extra_srcs + [file],
|
|
deps = deps,
|
|
**kwargs
|
|
)
|
|
|
|
def py_test_run_all_subdirectory(include, exclude, extra_srcs, **kwargs):
|
|
for file in native.glob(include = include, exclude = exclude, allow_empty=False):
|
|
print(file)
|
|
basename = paths.split_extension(file)[0]
|
|
if basename == file:
|
|
basename = basename + "_test"
|
|
native.py_test(
|
|
name = basename,
|
|
srcs = extra_srcs + [file],
|
|
**kwargs
|
|
)
|
|
|
|
# Runs all included notebooks as py_test targets, by first converting them to .py files with "test_myst_doc.py".
|
|
def py_test_run_all_notebooks(include, exclude, allow_empty=False, **kwargs):
|
|
for file in native.glob(include = include, exclude = exclude, allow_empty=allow_empty):
|
|
print(file)
|
|
basename = paths.split_extension(file)[0]
|
|
if basename == file:
|
|
basename = basename + "_test"
|
|
native.py_test(
|
|
name = basename,
|
|
main = "test_myst_doc.py",
|
|
srcs = ["//doc:test_myst_doc.py"],
|
|
# --find-recursively will look for file in all
|
|
# directories inside cwd recursively if it cannot
|
|
# find it right away. This allows to deal with
|
|
# mismatches between `name` and `data` args.
|
|
args = ["--find-recursively", "--path", file],
|
|
**kwargs
|
|
)
|