Skip to content

Commit 583a2c1

Browse files
authored
test(venv): Move test_link.py into the py_venv/tests (#1307)
This relocates the `test_link` target and its source file from `py/private/py_venv/ into py/private/py_venv/tests/`, keeping the test code alongside the rest of the package's tests. The `py_test` source paths and imports are updated accordingly. --- ### Changes are visible to end-users: no ### Test plan - Covered by existing test cases
1 parent 9588c90 commit 583a2c1

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

py/private/py_venv/BUILD.bazel

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
load("@bazel_lib//:bzl_library.bzl", "bzl_library")
22
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
3-
load("//py:defs.bzl", "py_test")
43

54
package(default_visibility = ["//py:__subpackages__"])
65

@@ -90,13 +89,3 @@ bzl_library(
9089
":types",
9190
],
9291
)
93-
94-
py_test(
95-
name = "test_link",
96-
srcs = [
97-
"link.py",
98-
"test_link.py",
99-
],
100-
imports = ["."],
101-
main = "test_link.py",
102-
)

py/private/py_venv/tests/BUILD.bazel

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
load("@bazel_lib//:bzl_library.bzl", "bzl_library")
22
load("@bazel_lib//lib:write_source_files.bzl", "write_source_files")
3+
load("//py:defs.bzl", "py_test")
34
load("//py/private/py_venv:defs.bzl", "py_venv", "py_venv_exec")
45
load(":venv_tree.bzl", "venv_tree")
56

7+
bzl_library(
8+
name = "venv_tree",
9+
srcs = ["venv_tree.bzl"],
10+
visibility = ["//py/private/py_venv:__subpackages__"],
11+
deps = ["//py/private/py_venv:defs"],
12+
)
13+
614
py_venv(
715
name = "venv",
816
testonly = True,
@@ -45,9 +53,12 @@ write_source_files(
4553
},
4654
)
4755

48-
bzl_library(
49-
name = "venv_tree",
50-
srcs = ["venv_tree.bzl"],
51-
visibility = ["//py/private/py_venv:__subpackages__"],
52-
deps = ["//py/private/py_venv:defs"],
56+
py_test(
57+
name = "test_link",
58+
srcs = [
59+
"//py/private/py_venv:link.py",
60+
"//py/private/py_venv/tests:test_link.py",
61+
],
62+
imports = [".."],
63+
main = "//py/private/py_venv/tests:test_link.py",
5364
)

0 commit comments

Comments
 (0)