-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ResourceWarning from unclosed detached data NRRD files (#90)
Enable all warnings during tests to see additional problems in the code. The following warning appeared: ``` ResourceWarning: unclosed file <_io.BufferedReader name='<PYNRRD_DIR>\\nrrd\\tests\\data\\BallBinary30x30x30.raw'> tb.tb_frame.clear() ``` Problem resolved by closing the file handle before raising errors. The only time this issue occurs is when the data is detached from the header. The detached data filename is loaded using an `open` call without a "with" block.
- Loading branch information
1 parent
bc5b7ee
commit 204b7df
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters