Skip to content

Commit 508b6a1

Browse files
committed
working tests
1 parent a284239 commit 508b6a1

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

tests/pypi/generate_whl_library_build_bazel/generate_whl_library_build_bazel_tests.bzl

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,25 @@ def _test_enable_implicit_namespace_pkgs_annotation(env):
215215
want = """\
216216
load("@rules_python//python/private/pypi:whl_library_targets.bzl", "whl_library_targets")
217217
218+
package(default_visibility = ["//visibility:public"])
219+
218220
whl_library_targets(
219221
dep_template = "@pypi//{name}:{target}",
220-
enable_implicit_namespace_pkgs = True,
221-
name = "foo.whl",
222222
dependencies = ["foo"],
223-
dependencies_by_platform = {"baz": ["bar"]},
223+
dependencies_by_platform = {
224+
"baz": ["bar"],
225+
},
226+
enable_implicit_namespace_pkgs = True,
224227
entry_points = {
225228
"foo": "bar.py",
226229
},
227-
group_deps = ["foo", "fox", "qux"],
230+
group_deps = [
231+
"foo",
232+
"fox",
233+
"qux",
234+
],
228235
group_name = "qux",
236+
name = "foo.whl",
229237
tags = ["tag1"],
230238
)
231239
"""
@@ -252,17 +260,25 @@ def _test_enable_implicit_namespace_pkgs_annotation_false(env):
252260
want = """\
253261
load("@rules_python//python/private/pypi:whl_library_targets.bzl", "whl_library_targets")
254262
263+
package(default_visibility = ["//visibility:public"])
264+
255265
whl_library_targets(
256266
dep_template = "@pypi//{name}:{target}",
257-
enable_implicit_namespace_pkgs = False,
258-
name = "foo.whl",
259267
dependencies = ["foo"],
260-
dependencies_by_platform = {"baz": ["bar"]},
268+
dependencies_by_platform = {
269+
"baz": ["bar"],
270+
},
271+
enable_implicit_namespace_pkgs = False,
261272
entry_points = {
262273
"foo": "bar.py",
263274
},
264-
group_deps = ["foo", "fox", "qux"],
275+
group_deps = [
276+
"foo",
277+
"fox",
278+
"qux",
279+
],
265280
group_name = "qux",
281+
name = "foo.whl",
266282
tags = ["tag1"],
267283
)
268284
"""

0 commit comments

Comments
 (0)