Skip to content

Commit f041eaa

Browse files
committed
test: Add test for main_module with bootstrap_impl=system_python
1 parent 5c68ff9 commit f041eaa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/bootstrap_impls/BUILD.bazel

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
1515
load("@rules_shell//shell:sh_test.bzl", "sh_test")
16+
load("//python:defs.bzl", "py_library")
1617
load("//tests/support:py_reconfig.bzl", "py_reconfig_binary", "py_reconfig_test")
1718
load("//tests/support:sh_py_run_test.bzl", "sh_py_run_test")
1819
load("//tests/support:support.bzl", "SUPPORTS_BOOTSTRAP_SCRIPT")
@@ -127,11 +128,22 @@ py_reconfig_test(
127128
name = "main_module_test",
128129
srcs = ["main_module.py"],
129130
bootstrap_impl = "script",
130-
imports = ["."],
131131
main_module = "tests.bootstrap_impls.main_module",
132132
target_compatible_with = SUPPORTS_BOOTSTRAP_SCRIPT,
133133
)
134134

135+
py_library(
136+
name = "main_module_system_python_lib",
137+
srcs = ["main_module.py"],
138+
)
139+
140+
py_reconfig_test(
141+
name = "main_module_system_python_test",
142+
bootstrap_impl = "system_python",
143+
main_module = "tests.bootstrap_impls.main_module",
144+
deps = [":main_module_system_python_lib"],
145+
)
146+
135147
sh_py_run_test(
136148
name = "inherit_pythonsafepath_env_test",
137149
bootstrap_impl = "script",

0 commit comments

Comments
 (0)