Skip to content

Commit

Permalink
Fixing codeQL issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-braf committed Mar 1, 2024
1 parent 3d30152 commit cb61be8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/c++/perf_analyzer/genai-pa/tests/test_llm_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ def test_write_to_file(self):
pa_json = LlmInputs.create_openai_llm_inputs(
model_name="OpenOrca", add_streaming=True
)
f = open(LlmInputs.OUTPUT_FILENAME, "r")
json_str = f.read()
f.close()
os.remove(LlmInputs.OUTPUT_FILENAME)
try:
f = open(LlmInputs.OUTPUT_FILENAME, "r")
json_str = f.read()
finally:
f.close()
os.remove(LlmInputs.OUTPUT_FILENAME)

assert pa_json == json.loads(json_str)

0 comments on commit cb61be8

Please sign in to comment.