Skip to content

Use pytest features to avoid having to use mv#1022

Merged
mhucka merged 1 commit intoquantumlib:mainfrom
mhucka:test-avoid-mv
Feb 27, 2026
Merged

Use pytest features to avoid having to use mv#1022
mhucka merged 1 commit intoquantumlib:mainfrom
mhucka:test-avoid-mv

Conversation

@mhucka
Copy link
Collaborator

@mhucka mhucka commented Feb 27, 2026

This updates the test-command parameter for cibuildwheel to include the argument --import-mode=importlib to pytest. This argument directs pytest not to add the project root to sys.path in a way that would cause the local qsimcirq source directory to shadow the installed wheel. This makes the manual moving of the directory unnecessary.

This updates the `test-command` parameter for cibuildwheel to include
the argument `--import-mode=importlib` to pytest. This argument directs
pytest not to add the project root to `sys.path` in a way that would
cause the local `qsimcirq` source directory to shadow the installed
wheel. This makes the manual moving of the directory unnecessary.
@github-actions github-actions bot added the Size: XS <10 lines changed label Feb 27, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully refactors the test command in pyproject.toml by leveraging pytest's --import-mode=importlib feature. This change eliminates the need for the mv workaround, making the testing process more robust and the configuration cleaner. The addition of a comment explaining the new pytest argument is also a good practice, enhancing maintainability.

@mhucka mhucka requested a review from pavoljuhas February 27, 2026 04:05
@mhucka mhucka added this pull request to the merge queue Feb 27, 2026
Merged via the queue into quantumlib:main with commit 09c3109 Feb 27, 2026
28 checks passed
@mhucka mhucka deleted the test-avoid-mv branch February 27, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants