You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running unit tests creates an empty file named "tmp1.json" in the root of the project. This appears to come from TestOpinelFsClass.test_save_blob_as_json() in test_utils_fs.py. I'm not sure what that function is supposed to accomplish since it doesn't appear to examine the files that it creates and the third line should always fail (unless run as root).
Recommendation
The test script should clean up any temporary files that it creates. Ideally, use context managers so that they are always deleted regardless of how the scope exits (normally, exception, etc.)
Use a proper temporary-file creation API to create a temporary file that is guaranteed to not collide with anything else, rather than just hoping that nothing else uses the name "tmp1.json". See https://docs.python.org/3/library/tempfile.html for some options.
Document the test function and ensure that it works.
Running unit tests creates an empty file named "tmp1.json" in the root of the project. This appears to come from
TestOpinelFsClass.test_save_blob_as_json()
in test_utils_fs.py. I'm not sure what that function is supposed to accomplish since it doesn't appear to examine the files that it creates and the third line should always fail (unless run as root).Recommendation
To Reproduce
The text was updated successfully, but these errors were encountered: