-
-
Notifications
You must be signed in to change notification settings - Fork 592
fix bug when checking empty file. add more coverage #535
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #535 +/- ##
==========================================
+ Coverage 90.97% 91.16% +0.18%
==========================================
Files 28 28
Lines 2660 2670 +10
==========================================
+ Hits 2420 2434 +14
+ Misses 240 236 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
claudep
left a comment
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.
Seems good, thanks!
|
Maybe just adapt the commit message to specify this concerns the yaml format. |
hugovk
left a comment
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.
Please could you check the permissions failure on Windows?
|
Ah yes, NamedTemporaryFile constructor is already returning a file-like object, so no need to reopen later (and Windows cannot reopen when it's already open). |
281fea9 to
4a17e3f
Compare
|
hugovk
left a comment
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.
Thanks!
While adding some coverage discovered the using
len(pickle)will raise and error since for empty filespickleisNone.Change the if condition to just
not picklesince it will also work for checking if the list is empty.Added two test cases to cover more branches.