Skip to content

Commit 0a16030

Browse files
committed
add diff_test
1 parent dc231df commit 0a16030

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/uv/private/lock.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"""A simple macro to lock the requirements.
1616
"""
1717

18+
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
1819
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
1920
load("//python:py_binary.bzl", "py_binary")
2021
load("//python/private:bzlmod_enabled.bzl", "BZLMOD_ENABLED") # buildifier: disable=bzl-visibility
@@ -183,6 +184,14 @@ def lock(*, name, srcs, out, args = [], **kwargs):
183184
cmd = locker_target,
184185
)
185186

187+
if existing_outputs:
188+
diff_test(
189+
name = name + "_test",
190+
file1 = out + ".new",
191+
file2 = existing_outputs[0],
192+
tags = ["manual"],
193+
)
194+
186195
# Write a script that can be used for updating the in-tree version of the
187196
# requirements file
188197
expand_template(

0 commit comments

Comments
 (0)