-
Notifications
You must be signed in to change notification settings - Fork 143
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
Clean up handling of temporary files in test suite #652
Conversation
I need to work out a Windows-compatible solution here. |
95460d5
to
f5e7011
Compare
Actually it looks like a lot of tests assume the current working directory is writable, so we should fix this another way. |
f5e7011
to
c6b66cf
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #652 +/- ##
==========================================
+ Coverage 83.47% 83.66% +0.19%
==========================================
Files 187 187
Lines 29692 29740 +48
==========================================
+ Hits 24784 24881 +97
+ Misses 4908 4859 -49 ☔ View full report in Codecov by Sentry. |
I assume this was added for debugging purposes at some point. The test doesn't need it and the current working directory might not be writable.
…ng tests The incoming current working directory may not be writable.
This is especially important when deserializing. If we don't catch errors after reading `size`, we may use its uninitialized value as a loop bound, which is very bad.
@aletempiac, the coverage report is triggered by the branching added by @rocallahan. Testing all of them requires considering many cases, and from the code we can see that he is giving us a better handling of the files. Do you suggest to address the coverage issue or can we proceed with merging this PR? |
1db53c9
to
9101eb0
Compare
Hmm, the tests pass for me. |
9101eb0
to
be07785
Compare
Dear @rocallahan,this is great, thank you for the tests! |
The current working directory may not be writable so it's better to write files explicitly to
/tmp
and clean them up afterward.