Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Aggregation Tests #645

Merged
merged 12 commits into from
Aug 31, 2022
27 changes: 27 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from tempfile import TemporaryDirectory

import pytest
import signac


class FlowProjectSetup:
project_class = signac.Project
entrypoint = dict(path="")
project_name = None

@pytest.fixture(autouse=True)
def _setup(self, request):
kidrahahjo marked this conversation as resolved.
Show resolved Hide resolved
self._tmp_dir = TemporaryDirectory(prefix="signac-flow_")
request.addfinalizer(self._tmp_dir.cleanup)
self.project = self.project_class.init_project(
name=self.project_name, root=self._tmp_dir.name
)
self.cwd = os.getcwd()
kidrahahjo marked this conversation as resolved.
Show resolved Hide resolved

def mock_project(self):
pass

@pytest.fixture
def project(self):
kidrahahjo marked this conversation as resolved.
Show resolved Hide resolved
return self.mock_project()
Loading