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

ProfileManager: always clear storage in clear_profile #5412

Merged
merged 1 commit into from
Mar 6, 2022

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Mar 6, 2022

The call to _clear on the storage in ProfileManager.clear_profile
was conditional on it already having been loaded. However, sometimes the
method may be called before the storage had already been loaded. This is
the case, for example, for the aiida_profile_clean fixture, which is
used by tests to start with an empty storage. Due to the conditional, in
some cases the storage would not be emptied and the test would fail if
the storage still contained data from a previous session.

The call to `_clear` on the storage in `ProfileManager.clear_profile`
was conditional on it already having been loaded. However, sometimes the
method may be called before the storage had already been loaded. This is
the case, for example, for the `aiida_profile_clean` fixture, which is
used by tests to start with an empty storage. Due to the conditional, in
some cases the storage would not be emptied and the test would fail if
the storage still contained data from a previous session.
@sphuber sphuber requested a review from chrisjsewell March 6, 2022 21:48
@sphuber sphuber merged commit 98167fd into aiidateam:develop Mar 6, 2022
@sphuber sphuber deleted the fix/test-manager-clear-profile branch March 6, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants