Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Reader/Writer to be context managers (#311)
* Allow Reader/Writer to be context managers By adding __enter__ and __exit__ methods to the Reader and Writer classes, they can now be used as context managers. Also added a test to make sure the Reader context manager works correctly. Did not add a test to do the same with Writer, because trying to write to a closed Writer results in a segfault rather than raising an exception that can be checked by pytest. * Remove enter/exit from Writer not necessary because they will be inherited
- Loading branch information