mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-07 00:04:26 +01:00
Fix imports, type hints and fixtures for goal oriented tests (#3415)
This commit is contained in:
committed by
GitHub
parent
adbb47fb65
commit
3d89ed1787
@@ -5,7 +5,8 @@ import pytest
|
||||
from autogpt.api_manager import ApiManager
|
||||
from autogpt.config import Config
|
||||
from autogpt.workspace import Workspace
|
||||
from tests.vcr.openai_filter import before_record_request
|
||||
|
||||
pytest_plugins = ["tests.integration.agent_factory"]
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@@ -25,8 +26,13 @@ def config(workspace: Workspace) -> Config:
|
||||
|
||||
# Do a little setup and teardown since the config object is a singleton
|
||||
old_ws_path = config.workspace_path
|
||||
old_file_logger_path = config.file_logger_path
|
||||
|
||||
config.workspace_path = workspace.root
|
||||
config.file_logger_path = workspace.get_path("file_logger.txt")
|
||||
yield config
|
||||
|
||||
config.file_logger_path = old_file_logger_path
|
||||
config.workspace_path = old_ws_path
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user