Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test improperly comparing measurement values #591

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Oct 21, 2024

A test was comparing equality of measurment values using ==, even though that returns another measurement value instead of boolean. Now that measruement values are intrinsically truthy and instead raise an error when used as a boolean, this test is raising an error.

This change fixes it to use qml.equal and qml.assert_equal instead of bool(m1 == m2).

tests/test_converter.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2e02d73) to head (df8a35b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #591   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          867       867           
=========================================
  Hits           867       867           

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

@albi3ro albi3ro merged commit fad15a1 into master Oct 22, 2024
10 checks passed
@albi3ro albi3ro deleted the fix-mcm-test branch October 22, 2024 21:24
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.

2 participants