Repository navigation
[release/2.57.0][core] Import pytest lazily in test_utils to fix runtime_env_container tests (#64762) - #64972
Merged
Merged
Conversation
…r tests (#64762) ## Description The scripts in `test_runtime_env_container` run inside a Ray image, which does not have pytest installed, so we can't add at the top level file but inside functions which only be called in pytest environment. Signed-off-by: yicheng <[email protected]> Co-authored-by: yicheng <[email protected]> (cherry picked from commit 934eda2) Signed-off-by: elliot-barn <[email protected]>
elliot-barn
enabled auto-merge (squash)
July 23, 2026 21:46
elliot-barn
disabled auto-merge
August 3, 2026 17:57
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.
Cherry-pick of #64762 (934eda2) to
releases/2.57.0.Description
Fixes the
runtime env container testsfailure on the release branch (postmerge build 18756):test_serve_telemetry[True/False]fail withModuleNotFoundError: No module named 'pytest'becauseray/serve/_private/test_utils.pyimports pytest at module level, and the scripts intest_runtime_env_containerrun inside a Ray image which does not have pytest installed. This change moves the import inside the functions that need it.🤖 Generated with Claude Code