Repository navigation
Fix assertions in tests that were always True - #1634
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1634 +/- ##
=======================================
Coverage 97.21% 97.21%
=======================================
Files 83 83
Lines 7961 7961
=======================================
Hits 7739 7739
Misses 222 222 Continue to review full report at Codecov.
|
StanczakDominik
left a comment
There was a problem hiding this comment.
Oh darn. Gotta admit that assert syntax was always a little magical to me.
So without the parenthesis, it passes in an unzipped tuple (like *args), and with them, just a tuple that's always true since it's non empty?
Good catch, all in all!
That's my understanding of it! I think it was an extension to PyCharm (or maybe |
There were a few tests in
test_dielectric.pywhich were of the formThis was doing an
asserton a non-emptytuple, which consequently always evaluated toTrue. This PR adjusts the parentheses on the tests.