Skip to content

Commit c37e679

Browse files
authored
fix: allow test venv to be run (#348)
Allows the tests venv target to be run, creating the virtual env for the test target. See #15 (comment) --- ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): no - Suggested release notes appear below: yes It's now possible to run the venv target produced by a `py_test` ### Test plan <!-- Delete any which do not apply --> - Manual testing; please provide instructions so we can reproduce: `bazel run :some_test.venv` works now in a fresh repo
1 parent a63c208 commit c37e679

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

py/defs.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def _py_binary_or_test(name, rule, srcs, main, imports, deps = [], resolutions =
4646
imports = imports,
4747
resolutions = resolutions,
4848
tags = ["manual"],
49+
testonly = kwargs.get("testonly", False),
4950
)
5051

5152
def py_binary(name, srcs = [], main = None, imports = ["."], **kwargs):

0 commit comments

Comments
 (0)