-
Notifications
You must be signed in to change notification settings - Fork 303
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
Replace patched print
with capsys fixture
#2929
Conversation
assert checked_fake, "Did not find __fake package mentioned in checks" | ||
assert checked_viirs_sdr, "Did not find viirs_sdr in readers mentioned in checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these do what are meant to do:
>>> foo = "bar"
>>> assert foo, "bar"
>>> assert foo, "foo"
>>> assert foo == "foo"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AssertionError
assert checked_fake, "Did not find __fake package mentioned in checks" | ||
assert checked_viirs_sdr, "Did not find viirs_sdr in readers mentioned in checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is working as intended (though i'm following along what was there before).
I /tmp> cat dbg.py
assert True, "you wont see me"
assert False, "this is a helpful message"
I /tmp> python3 dbg.py
Traceback (most recent call last):
File "/tmp/dbg.py", line 2, in <module>
assert False, "this is a helpful message"
^^^^^
AssertionError: this is a helpful message
I /tmp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. I misunderstood the assertion as I've never seen that before 🙈
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2929 +/- ##
=======================================
Coverage 96.06% 96.07%
=======================================
Files 373 373
Lines 54477 54479 +2
=======================================
+ Hits 52336 52338 +2
Misses 2141 2141
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 11303672980Details
💛 - Coveralls |
assert checked_fake, "Did not find __fake package mentioned in checks" | ||
assert checked_viirs_sdr, "Did not find viirs_sdr in readers mentioned in checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is working as intended (though i'm following along what was there before).
I /tmp> cat dbg.py
assert True, "you wont see me"
assert False, "this is a helpful message"
I /tmp> python3 dbg.py
Traceback (most recent call last):
File "/tmp/dbg.py", line 2, in <module>
assert False, "this is a helpful message"
^^^^^
AssertionError: this is a helpful message
I /tmp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks and sorry about the noise!
assert checked_fake, "Did not find __fake package mentioned in checks" | ||
assert checked_viirs_sdr, "Did not find viirs_sdr in readers mentioned in checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. I misunderstood the assertion as I've never seen that before 🙈
Small change to replace patched print with nicer capsys fixture. Figured I would replace it other tests, turns out there was only one location.