From e67bac4080bb8a782d0003076342a92d162b0e21 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 7 Dec 2022 21:25:22 +0000 Subject: [PATCH] Testing: Fix unclosed file open --- test/test_volatility.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_volatility.py b/test/test_volatility.py index fb4fece12..aaad615bc 100644 --- a/test/test_volatility.py +++ b/test/test_volatility.py @@ -120,9 +120,8 @@ def test_windows_hivelist(image, volatility, python): def test_windows_dumpfiles(image, volatility, python): - json_file = open("./test/known_files.json") - - known_files = json.load(json_file) + with open("./test/known_files.json") as json_file: + known_files = json.load(json_file) failed_chksms = 0