14965: Cleans up test output by reducing resource warnings
[arvados.git] / services / fuse / tests / test_tmp_collection.py
index a70df8822524f66e449051092c9b06f3d6c6b325..f85cc2b384b973fd96788839df2e3b4d525e7336 100644 (file)
@@ -54,9 +54,8 @@ class TmpCollectionArgsTest(unittest.TestCase):
 
 
 def current_manifest(tmpdir):
-    return json.load(open(
-        os.path.join(tmpdir, '.arvados#collection')
-    ))['manifest_text']
+    with open(os.path.join(tmpdir, '.arvados#collection')) as tmp:
+        return json.load(tmp)['manifest_text']
 
 
 class TmpCollectionTest(IntegrationTest):