python/test: Faster tests and better BUILD (#9791)

This commit is contained in:
Barak Michener
2020-08-06 10:58:42 -07:00
committed by GitHub
parent 6a1acce791
commit 21994c594b
7 changed files with 984 additions and 1468 deletions
+12
View File
@@ -0,0 +1,12 @@
# 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, **kwargs):
for file in files:
# remove .py
name = file[:-3]
native.py_test(
name=name,
size=size,
srcs=extra_srcs+[file],
**kwargs
)