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
Fix HDF5Serializer
test for h5py<2.9
#8220
Conversation
How about using import os
import tempfile
with tempfile.NamedTemporaryFile() as f:
with open(f.name, 'w') as f2:
f2.write('aa\n')
f2.write('bb\n')
with open(f.name, 'r') as f3:
print(f3.readlines())
print(os.path.exists(f.name))
|
Is the code guaranteed to run?
https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile In any case, I'll add the comment to the code about which |
@toslunar |
LGTM |
HDF5Serializer
test for h5py<2.9
Jenkins CI test (for commit 88041a8, target branch master) succeeded! |
@mergify[bot] This pull-request is marked as |
Fix `HDF5Serializer` test for h5py<2.9
Chainer is tested with h5py>=2.5.
https://github.com/chainer/chainer-test/blob/b1b40421a2d7c73b86590575b19b82c801a12778/run_combination_test.py#L21
#8182 uses a feature of h5py>=2.9 (h5py/h5py#1061).