tests: simplify loading of result document from file

This commit is contained in:
Willi Ballenthin
2023-03-23 11:04:53 +01:00
committed by GitHub
parent 840145f947
commit c52b0a22e0

View File

@@ -1109,10 +1109,7 @@ def _039a6_dotnetfile_extractor():
def get_result_doc(path):
with open(path, "rb") as f:
buf = f.read()
src = buf.decode("utf-8")
return capa.render.result_document.ResultDocument.parse_raw(src)
return capa.render.result_document.ResultDocument.parse_file(path)
@pytest.fixture