Skip to content

Commit bed1b61

Browse files
committed
use .test instead of _test
1 parent 6a6eaf5 commit bed1b61

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

python/private/pypi/pip_compile.bzl

+8-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def pip_compile(
4747
4848
It also generates two targets for running pip-compile:
4949
50-
- validate with `bazel test [name]_test`
50+
- validate with `bazel test [name].test`
5151
- update with `bazel run [name].update`
5252
5353
If you are using a version control system, the requirements.txt generated by this rule should
@@ -166,7 +166,7 @@ def pip_compile(
166166
timeout = kwargs.pop("timeout", "short")
167167

168168
py_test(
169-
name = name + "_test",
169+
name = name + ".test",
170170
timeout = timeout,
171171
# setuptools (the default python build tool) attempts to find user
172172
# configuration in the user's home direcotory. This seems to work fine on
@@ -180,3 +180,9 @@ def pip_compile(
180180
# kwargs could contain test-specific attributes like size
181181
**dict(attrs, **kwargs)
182182
)
183+
184+
alias(
185+
name = "{}_test".format(name),
186+
actual = ":{}.test".format(name),
187+
deprecation = "Use '{}.test' instead. The '*_test' target will be removed in the next major release.".format(name),
188+
)

0 commit comments

Comments
 (0)