Skip to content

Add unit test to cover previously-uncovered BKSF transform cases#1328

Closed
mhucka wants to merge 4 commits into
quantumlib:mainfrom
mhucka:remove-pragmas
Closed

Add unit test to cover previously-uncovered BKSF transform cases#1328
mhucka wants to merge 4 commits into
quantumlib:mainfrom
mhucka:remove-pragmas

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented Jun 2, 2026

This PR adds a test to resolve a missing test coverage, and removes two pragma: no cover comments in bksf.py.

@mhucka mhucka changed the title Remove no-longer-necessary pragmas Add unit test to bksf_test.py to cover previously-uncovered cases Jun 3, 2026
@mhucka
Copy link
Copy Markdown
Collaborator Author

mhucka commented Jun 3, 2026

/gemini review

Copy link
Copy Markdown
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

This pull request removes # pragma: no cover comments from bksf.py and adds a new test case test_bravyi_kitaev_fast_interaction_op_coverage to cover those previously skipped code paths. The feedback recommends replacing the standard assert statement in the new test with self.assertIsNotNone(qubit_op) to ensure the test is always executed, even when Python is run with optimization flags.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/openfermion/transforms/opconversions/bksf_test.py Outdated
@mhucka mhucka changed the title Add unit test to bksf_test.py to cover previously-uncovered cases Add unit test to cover previously-uncovered BKSF transform cases Jun 3, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@mhucka mhucka closed this Jun 3, 2026
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