aiidateam / aiida-test-cache

A pytest plugin to simplify testing of AiiDA plugins.
MIT License
5 stars 8 forks source link

Switch to new aiida-core pytest fixtures with SQLite backend #70

Open danielhollas opened 3 days ago

danielhollas commented 3 days ago

Instead of manage/tests/pytest_fixtures.py use tools/pytest_fixtures/ introduced in aiida 2.6.0. These new fixtures use the sqlite_dos storage backend by default. See https://aiida.readthedocs.io/projects/aiida-core/en/stable/topics/plugins.html#plugin-test-fixtures

This should hopefully be more-or-less a drop-in replacement.

danielhollas commented 3 days ago

By quick inspection, the only aiida-core fixture that's in use here is the aiida_localhost in mock_code

https://github.com/aiidateam/aiida-testing/blob/2bf9dfaef5d7658b47f5b31dd1ce81da5c43c53c/aiida_testing/mock_code/__init__.py#L20

https://github.com/aiidateam/aiida-testing/blob/2bf9dfaef5d7658b47f5b31dd1ce81da5c43c53c/aiida_testing/mock_code/_fixtures.py#L121

ltalirz commented 2 days ago

sounds good