Skip to content

Conversation

dstrain115
Copy link
Collaborator

  • This either adds tests or "pragma: nocover" for all uncovered lines in cirq.
  • Most of it is overloads, not implemented methods, or test objects.
  • However, a few things were missing tests.

Fixes: #3939

- This either adds tests or "pragma: nocover" for all uncovered lines
in cirq.
- Most of it is overloads, not implemented methods, or test objects.
- However, a few things were missing tests.

Fixes: quantumlib#3939
@dstrain115 dstrain115 requested review from mrwojtek, vtomole, a team, wcourtney and verult as code owners April 2, 2025 23:14
@pavoljuhas
Copy link
Collaborator

pavoljuhas commented Apr 2, 2025

The magic comment should be # pragma: no cover - https://coverage.readthedocs.io/en/latest/excluding.html#excluding-code-from-coverage-py

Can you please update?

done in 7b1c765

@pavoljuhas pavoljuhas self-assigned this Apr 3, 2025
@pavoljuhas pavoljuhas requested a review from dabacon as a code owner April 3, 2025 05:57
Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

LGTM if the tests pass. Please check if you are OK with my updates.

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.66%. Comparing base (b16aeda) to head (01d2933).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7220      +/-   ##
==========================================
+ Coverage   98.15%   98.66%   +0.50%     
==========================================
  Files        1100     1106       +6     
  Lines       96253    95864     -389     
==========================================
+ Hits        94473    94580     +107     
+ Misses       1780     1284     -496     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dstrain115 dstrain115 added this pull request to the merge queue Apr 3, 2025
Merged via the queue into quantumlib:main with commit 24b07a8 Apr 3, 2025
39 checks passed
@dstrain115 dstrain115 deleted the fix_all_the_coverage branch April 3, 2025 14:28
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request Apr 3, 2025
Let us avoid test-only argument in `circuit_to_pdf_using_qcircuit_via_tex`.
Also check if PDF is generated and auxiliary files are cleaned.

Related to quantumlib#7220
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request Apr 4, 2025
Let us avoid test-only argument in `circuit_to_pdf_using_qcircuit_via_tex`.
Mock `Document.generate_pdf` so we can test without the `latexmk` program.

Related to quantumlib#7220
pavoljuhas added a commit to pavoljuhas/Cirq that referenced this pull request Apr 4, 2025
Let us avoid test-only argument in `circuit_to_pdf_using_qcircuit_via_tex`.
Mock `Document.generate_pdf` so we can test without the `latexmk` program.

Related to quantumlib#7220
github-merge-queue bot pushed a commit that referenced this pull request Apr 4, 2025
…7227)

Let us avoid test-only argument in `circuit_to_pdf_using_qcircuit_via_tex`.
Mock `Document.generate_pdf` so we can test without the `latexmk` program.

Related to #7220
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
* Fix ALL THE COVERAGE

- This either adds tests or "pragma: nocover" for all uncovered lines
in cirq.
- Most of it is overloads, not implemented methods, or test objects.
- However, a few things were missing tests.

Fixes: quantumlib#3939

* Use coverage exclusion comment `# pragma: no cover`

Ref: https://coverage.readthedocs.io/en/latest/excluding.html

* Exclude coverage of the `pass` statement by default

* Exclude coverage of `raise NotImplementedError` by default

* Fix qcircuit pdf coverage

* Update cirq-core/cirq/experiments/random_quantum_circuit_generation.py

Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>

* format

---------

Co-authored-by: Pavol Juhas <juhas@google.com>
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…uantumlib#7227)

Let us avoid test-only argument in `circuit_to_pdf_using_qcircuit_via_tex`.
Mock `Document.generate_pdf` so we can test without the `latexmk` program.

Related to quantumlib#7220
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.

Missing coverage
2 participants