Skip to content

Commit

Permalink
WIP: Support new fixtures with sqlite backend
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Nov 19, 2024
1 parent 19ebd1b commit a2c82bf
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions aiida_test_cache/mock_code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@
"mock_code_factory",
)

# ensure aiida's pytest plugin is loaded, which we rely on
pytest_plugins = ['aiida.manage.tests.pytest_fixtures']
# Load aiida's pytest fixtures
try:
# These new fixtures which use sqlite backend, introduced in aiida v2.6
# TODO: It's not clear what happens if the user than activates
# the old fixtures as well.
import aiida.tools.pytest_fixtures
pytest_plugins = ['aiida.tools.pytest_fixtures']
except ImportError:
pytest_plugins = ['aiida.manage.tests.pytest_fixtures']

0 comments on commit a2c82bf

Please sign in to comment.