Skip to content

Commit 6295fd9

Browse files
committed
format
1 parent b37b35a commit 6295fd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/pytest/test_pytest_env_overwrite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def test_input_messages_in_decorator(row: EvaluationRow) -> EvaluationRow:
2323
return row
2424

2525

26+
with mock.patch.dict(os.environ, {"EP_COMPLETION_PARAMS": '[{"model": "gpt-40"}]'}):
2627

27-
with mock.patch.dict(os.environ, {"EP_COMPLETION_PARAMS": "[{\"model\": \"gpt-40\"}]"}):
2828
@evaluation_test(
2929
input_rows=[[EvaluationRow(messages=[Message(role="user", content="What is 5 * 6?")])]],
3030
completion_params=[{"model": "no-op"}], # This should be overridden by the env var
@@ -38,7 +38,6 @@ def test_input_messages_in_env(row: EvaluationRow) -> EvaluationRow:
3838
return row
3939

4040

41-
4241
_jsonl_tmpdir = tempfile.mkdtemp()
4342
atexit.register(shutil.rmtree, _jsonl_tmpdir, ignore_errors=True)
4443

@@ -49,6 +48,7 @@ def test_input_messages_in_env(row: EvaluationRow) -> EvaluationRow:
4948
)
5049
print(f"finish prepare input file {input_path}")
5150
with mock.patch.dict(os.environ, {"EP_JSONL_PATH": input_path}):
51+
5252
@evaluation_test(
5353
input_rows=[[EvaluationRow(messages=[Message(role="user", content="This will be ignored")])]],
5454
completion_params=[{"model": "no-op"}],

0 commit comments

Comments
 (0)