aboutsummaryrefslogtreecommitdiff
path: root/absl/testing/BUILD
diff options
context:
space:
mode:
authorYilei Yang <yileiyang@google.com>2021-10-07 12:49:41 -0700
committerCopybara-Service <copybara-worker@google.com>2021-10-07 12:50:14 -0700
commit1910e64fe1b6e2a276afe0170f382c3b56802402 (patch)
tree25ba513ed68a290310ab935a5e87f714f0a3a15f /absl/testing/BUILD
parent5bc02408a1ef380b606f43fc463018f243611c72 (diff)
downloadabsl-py-1910e64fe1b6e2a276afe0170f382c3b56802402.tar.gz
#128: support matching substring and glob patterns using bazel's `--test_filter=` flag (Python 3.7+ only).
Previously, the `--test_filter=` arguments are passed to Python's unittest as positional arguments. This only matches by class or method's full names. After this, `--test_filter=` has the same meaning as unittest's `-k` flag: https://docs.python.org/3/library/unittest.html#cmdoption-unittest-k One notable behavior difference: previously if the filter doesn't match any tests, the test would fail; now it doesn't fail. This also makes filtering `absltest.parameterized` tests significantly more user friendly. This change is only for Python 3.7+. PiperOrigin-RevId: 401582298 Change-Id: I074e9283706fe9c88a8dbb392084fb6548cebc6f
Diffstat (limited to 'absl/testing/BUILD')
-rw-r--r--absl/testing/BUILD3
1 files changed, 2 insertions, 1 deletions
diff --git a/absl/testing/BUILD b/absl/testing/BUILD
index 609d626..14c9a5f 100644
--- a/absl/testing/BUILD
+++ b/absl/testing/BUILD
@@ -106,7 +106,7 @@ py_library(
py_test(
name = "tests/absltest_filtering_test",
- size = "small",
+ size = "medium",
srcs = ["tests/absltest_filtering_test.py"],
data = [":tests/absltest_filtering_test_helper"],
python_version = "PY3",
@@ -128,6 +128,7 @@ py_binary(
srcs_version = "PY3",
deps = [
":absltest",
+ ":parameterized",
"//absl:app",
],
)