Skip to content

Commit e67bac4

Browse files
committed
Testing: Fix unclosed file open
1 parent 4cf0a18 commit e67bac4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/test_volatility.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ def test_windows_hivelist(image, volatility, python):
120120

121121
def test_windows_dumpfiles(image, volatility, python):
122122

123-
json_file = open("./test/known_files.json")
124-
125-
known_files = json.load(json_file)
123+
with open("./test/known_files.json") as json_file:
124+
known_files = json.load(json_file)
126125

127126
failed_chksms = 0
128127

0 commit comments

Comments
 (0)