Skip to content

Commit d2c054f

Browse files
committed
finish fixing all tests
1 parent 9a2f6ff commit d2c054f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

python/private/pypi/generate_whl_library_build_bazel.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _TEMPLATE = """\
4040
4141
package(default_visibility = ["//visibility:public"])
4242
43-
whl_library_targets(
43+
{fn}(
4444
{kwargs}
4545
)
4646
"""
@@ -79,7 +79,7 @@ def generate_whl_library_build_bazel(
7979

8080
for arg in unsupported_args:
8181
if kwargs.get(arg):
82-
fail("Unsupported arg: {}".format(arg))
82+
fail("BUG, unsupported arg: '{}'".format(arg))
8383

8484
loads = [
8585
"""load("@rules_python//python/private/pypi:whl_library_targets.bzl", "{}")""".format(fn),
@@ -101,6 +101,7 @@ def generate_whl_library_build_bazel(
101101
[
102102
_TEMPLATE.format(
103103
loads = "\n".join(loads),
104+
fn = fn,
104105
kwargs = render.indent("\n".join([
105106
"{} = {},".format(k, _RENDER.get(k, repr)(v))
106107
for k, v in sorted(kwargs.items())

tests/pypi/generate_whl_library_build_bazel/generate_whl_library_build_bazel_tests.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ _tests.append(_test_all)
8686
def _test_all_with_loads(env):
8787
want = """\
8888
load("@rules_python//python/private/pypi:whl_library_targets.bzl", "whl_library_targets_from_requires")
89-
load("@pypi//:config.bzl", "target_platforms")
9089
9190
package(default_visibility = ["//visibility:public"])
9291
@@ -119,7 +118,6 @@ whl_library_targets_from_requires(
119118
"qux",
120119
],
121120
srcs_exclude = ["srcs_exclude_all"],
122-
target_platforms = target_platforms,
123121
)
124122
125123
# SOMETHING SPECIAL AT THE END

0 commit comments

Comments
 (0)