1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
load("@pip//:requirements.bzl", "requirement")
def py_pytest(name, srcs, deps = [], **kwargs):
native.py_test(
name = name,
srcs = ["//private:pytest_wrapper.py"],
main = "//private:pytest_wrapper.py",
data = srcs,
args = [
"--black",
"--pylint",
#"--mypy",
] + ["$(location :%s)" % x for x in srcs],
deps = [
requirement("pytest"),
requirement("pytest-black"),
requirement("pytest-pylint"),
requirement("pytest-mypy"),
] + deps,
**kwargs
)
|