[Misc] Replace os environ to monkeypatch in test suite (#14516)
Signed-off-by: sibi <85477603+t-sibiraj@users.noreply.github.com> Signed-off-by: Aaron Pham <contact@aarnphm.xyz> Co-authored-by: Cyrus Leung <cyrus.tl.leung@gmail.com> Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
@@ -45,7 +45,7 @@ def make_request() -> EngineCoreRequest:
|
||||
|
||||
|
||||
@fork_new_process_for_each_test
|
||||
def test_engine_core(monkeypatch):
|
||||
def test_engine_core(monkeypatch: pytest.MonkeyPatch):
|
||||
|
||||
with monkeypatch.context() as m:
|
||||
m.setenv("VLLM_USE_V1", "1")
|
||||
@@ -159,10 +159,10 @@ def test_engine_core(monkeypatch):
|
||||
|
||||
|
||||
@fork_new_process_for_each_test
|
||||
def test_engine_core_advanced_sampling(monkeypatch):
|
||||
def test_engine_core_advanced_sampling(monkeypatch: pytest.MonkeyPatch):
|
||||
"""
|
||||
A basic end-to-end test to verify that the engine functions correctly
|
||||
when additional sampling parameters, such as top_p, min_tokens, and
|
||||
A basic end-to-end test to verify that the engine functions correctly
|
||||
when additional sampling parameters, such as top_p, min_tokens, and
|
||||
presence_penalty, are set.
|
||||
"""
|
||||
with monkeypatch.context() as m:
|
||||
@@ -209,7 +209,7 @@ def test_engine_core_advanced_sampling(monkeypatch):
|
||||
|
||||
|
||||
@fork_new_process_for_each_test
|
||||
def test_engine_core_concurrent_batches(monkeypatch):
|
||||
def test_engine_core_concurrent_batches(monkeypatch: pytest.MonkeyPatch):
|
||||
"""
|
||||
Test that the engine can handle multiple concurrent batches.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user