fmartingr
/
jeeves
Archived
1
0
Fork 0
This repository has been archived on 2021-02-14. You can view files and clone it, but cannot push or open issues or pull requests.
jeeves/jeeves/core/tests/conftest.py

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)