Skip to content

Commit

Permalink
Update tests to use new aiida's fixtures, fix docs build (#181)
Browse files Browse the repository at this point in the history
Use `aiida_profile_clean` instead of the `aiida_profile` fixture.
  • Loading branch information
yakutovicha authored Jan 4, 2023
1 parent d7ba2b0 commit 8f981eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ def cp2k_code(aiida_local_code_factory): # pylint: disable=unused-argument
return aiida_local_code_factory("cp2k", "cp2k")


@pytest.fixture(scope="function")
def clear_database(aiida_profile):
"""Clear the database after a test with this fixture"""
yield
aiida_profile.reset_db()
@pytest.fixture(scope="function", autouse=True)
def clear_database(aiida_profile_clean):
"""Automatically clear database in between tests."""


# from https://stackoverflow.com/a/25188424
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,5 @@ def setup(app):
("py:class", "utils.AttributesFrozendict"),
("py:class", "State"),
("py:class", "Stepper"),
("py:class", "CalcJobNode"),
]

0 comments on commit 8f981eb

Please sign in to comment.