Repository navigation
Fix local testing - #3228
Merged
Merged
Fix local testing#3228
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Explicit helper imports cuda_core/tests/helpers/__init__.py |
The initializer explicitly imports IS_LINUX, IS_WINDOWS, IS_WSL, libc, and under_compute_sanitizer. |
Possibly related issues
- CI doesn't test the latest release of cuda_core against cuda_bindings main #2449 — The import change is related to the reported local testing setup with installed
cuda_bindings_13andcuda_core.
Possibly related PRs
- NVIDIA/cuda-python#3173 — It addresses the repository-local test helper import path and module cache behavior.
Suggested labels: cuda.core, test
Suggested reviewers: cpcloud
Priority:
Change: Bug fix
Merge Risk: 
Minimal · up to 04f87
-
No merge-blocking risk was identified in this focused test-helper import change.
Comment @coderabbitai help to get the list of available commands.
Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
Contributor
|
Member
|
CI failed due to #3038. I re-ran it. |
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.
0271e3a broke local
cuda_coretesting.To reproduce:
Pytest resolves those filterwarnings entries while loading config, which is before cuda_core/tests/conftest.py runs. At that point it imports helpers, and pythonpath = tests makes that importable.
The conftest's sys.path fallback for cuda_python_test_helpers hasn't run yet. From the repo root, cuda_python_test_helpers resolves to the empty namespace directory.
helpers/init.py does from cuda_python_test_helpers import *, which binds nothing and raises nothing. So helpers finishes importing and stays cached in sys.modules without IS_WINDOWS, IS_WSL or libc.
helpers.memory then fails to import. That failure is the "Failed to import filter module" warning the pytest.ini comment says it ignores. The cached helpers package stays, and the conftest bootstrap never evicts it.
Every later from helpers... import IS_WINDOWS then fails.
Avoiding
import *is the simplest way to fix this.