Skip to content

Commit af286da

Browse files
committed
Revert change in SDPX tests XML loading
The ways of XML and encoding are sometimes complex. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 953a40e commit af286da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/formattedcode/test_output_spdx.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def check_rdf_scan(expected_file, result_file, regen=False):
122122
with io.open(expected_file, 'w', encoding='utf-8') as o:
123123
json.dump(result, o, indent=2)
124124
else:
125-
expected = load_and_clean_rdf(expected_file)
125+
with io.open(expected_file, encoding='utf-8') as i:
126+
expected = json.load(i)
127+
expected = load_and_clean_rdf(result_file)
126128

127129
assert json.dumps(result, indent=2) == json.dumps(expected, indent=2)
128130

0 commit comments

Comments
 (0)