25 lines
495 B
Python
25 lines
495 B
Python
import os
|
|
|
|
import pytest
|
|
|
|
from jeeves.core.objects import Workspace
|
|
from jeeves.core.registry import ActionRegistry
|
|
|
|
|
|
@pytest.fixture(scope="session", autouse=True)
|
|
def autoregister_actions():
|
|
ActionRegistry.autodiscover()
|
|
|
|
|
|
@pytest.fixture
|
|
def workspace_obj():
|
|
"""
|
|
Fixture that returns a :any:`core.objects.Workspace` object and then ensures
|
|
the path it's deleted.
|
|
|
|
Used for action tests.
|
|
"""
|
|
workspace = Workspace()
|
|
yield workspace
|
|
os.rmdir(workspace.path)
|