diff -r 3d0178bf1039 -r 0585337ea787 tests/f --- a/tests/f Wed Mar 14 11:16:45 2018 -0700 +++ b/tests/f Wed Mar 14 15:39:28 2018 -0400 @@ -61,7 +61,8 @@ if opts.type: facts.append(b'file') if any((opts.hexdump, opts.dump, opts.md5, opts.sha1, opts.sha256)): - content = open(f, 'rb').read() + with open(f, 'rb') as fobj: + content = fobj.read() elif islink: if opts.type: facts.append(b'link')