Skip to content

Commit 2da1247

Browse files
committed
Do not use encoding with json.loads
This is no longer supported in newest Python versions. Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent c79c0ec commit 2da1247

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/licensedcode/test_match_spdx_lid.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ def test_method(self):
6868
qry = Query(location=test_loc, idx=idx)
6969
results = [list(l) for l in qry.spdx_lines]
7070
if regen:
71-
wmode = 'w'
72-
with open(expected_loc, wmode) as ef:
71+
with open(expected_loc, 'w') as ef:
7372
json.dump(results, ef, indent=2)
7473
expected = results
7574
else:
76-
with open(expected_loc, 'rb') as ef:
77-
expected = json.load(ef, encoding='utf-8')
75+
with open(expected_loc) as ef:
76+
expected = json.load(ef)
7877

7978
assert results == expected
8079

0 commit comments

Comments
 (0)