Repository navigation
absltest: do not fail tests on Python 3.12+ when no tests ran and: - #253
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_565190992
branch
5 times, most recently
from
September 14, 2023 21:38
9ff9bfa to
8d1a40c
Compare
absltest: do not fail tests on Python 3.12+ when no tests ran AND:absltest: do not fail tests on Python 3.12+ when no tests ran and:
copybara-service
Bot
force-pushed
the
test_565190992
branch
4 times, most recently
from
September 15, 2023 20:54
14f99e8 to
609aa55
Compare
- Either test filtering is used - Or sharding is used and the shard index > 0, i.e. only the first shard will fail when no tests ran on Python 3.12+. Context: Python 3.12 unittest will now fail when no tests ran after the change from python/cpython#102051. Since `absltest` is built on top of `unittest`, it will follow this behavior change in Python 3.12. However, when test filtering is used in `absltest`, often used via `bazel test --test_filter=<my_filter>`, the current user expectation is the `bazel test` command should NOT fail is at least one test ran. Since the test runner here has no visibility of the overall `bazel` invocation, we'll make the test not fail when test filtering is used via bazel's environment variable. This is the existing behavior before Python 3.12. Also test absl-py on Python 3.12. PiperOrigin-RevId: 565771935
copybara-service
Bot
force-pushed
the
test_565190992
branch
from
September 15, 2023 21:02
609aa55 to
1edf2ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
absltest: do not fail tests on Python 3.12+ when no tests ran and:Context: Python 3.12 unittest will now fail when no tests ran after the change from python/cpython#102051. Since
absltestis built on top ofunittest, it will follow this behavior change in Python 3.12.However, when test filtering is used in
absltest, often used viabazel test --test_filter=<my_filter>, the current user expectation is thebazel testcommand should NOT fail is at least one test ran. Since the test runner here has no visibility of the overallbazelinvocation, we'll make the test not fail when test filtering is used via bazel's environment variable. This is the existing behavior before Python 3.12.Also test absl-py on Python 3.12.