Skip to content

fix(unit-tests): Prevent relative imports in tests#91

Merged
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-uulpnnurkymt
May 6, 2026
Merged

fix(unit-tests): Prevent relative imports in tests#91
janickm merged 1 commit intoNVIDIA:mainfrom
janickm:dev/janickm/push-uulpnnurkymt

Conversation

@janickm
Copy link
Copy Markdown
Collaborator

@janickm janickm commented May 6, 2026

Previously ncore/data/init.py was deleted after test execution due to bazel overwriting the package init file - disallow this in test targets and fix all relative imports to be absolute.

This pull request primarily updates import statements in various test files to use absolute imports instead of relative imports, improving code clarity and maintainability. Additionally, a minor Bazel configuration change is included.

Test Import Refactoring:

  • Updated all test files in ncore/impl/data and subdirectories to use absolute imports for modules under ncore.impl.data and ncore.impl.data.v4, replacing relative imports. This change helps avoid import errors and improves test robustness and readability. [1] [2] [3] [4] [5]

Previously ncore/data/__init__.py was deleted after
test execution due to bazel overwriting the package
init file - disallow this in test targets and
fix all relative imports to be absolute.
@janickm janickm self-assigned this May 6, 2026
@janickm janickm merged commit e4de909 into NVIDIA:main May 6, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/push-uulpnnurkymt branch May 6, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant