forked from ScottLogic/InferLLM
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
281c208
commit 568b03d
Showing
4 changed files
with
21 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# conftest.py | ||
import pytest | ||
import os | ||
from unittest.mock import AsyncMock, patch | ||
|
||
|
||
@pytest.hookimpl(tryfirst=True) | ||
def pytest_configure(config): | ||
# Set an environment variable to indicate pytest is running | ||
os.environ["PYTEST_RUNNING"] = "1" | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def mock_async_openai(): | ||
with patch("src.llm.openai.AsyncOpenAI") as mock_async_openai: | ||
yield mock_async_openai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters