mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-24 01:14:22 +01:00
Add workspace abstraction (#2982)
* Add workspace abstraction * Remove old workspace implementation * Extract path resolution to a helper function * Add api key requirements to new tests
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from autogpt.workspace import Workspace
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def workspace_root(tmp_path) -> Path:
|
||||
return tmp_path / "home/users/monty/auto_gpt_workspace"
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def workspace(workspace_root: Path) -> Workspace:
|
||||
workspace_root = Workspace.make_workspace(workspace_root)
|
||||
return Workspace(workspace_root, restrict_to_workspace=True)
|
||||
|
||||
Reference in New Issue
Block a user