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

🧪 TESTS: Entirely remove AiidaTestCase #5372

Merged
merged 3 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 0 additions & 117 deletions .github/system_tests/test_plugin_testcase.py

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ SYSTEM_TESTS="${GITHUB_WORKSPACE}/.github/system_tests"
pytest --cov aiida --verbose --noconftest ${SYSTEM_TESTS}/test_test_manager.py
pytest --cov aiida --verbose --noconftest ${SYSTEM_TESTS}/test_ipython_magics.py
pytest --cov aiida --verbose --noconftest ${SYSTEM_TESTS}/test_profile_manager.py
python ${SYSTEM_TESTS}/test_plugin_testcase.py # uses custom unittest test runner

# Until the `${SYSTEM_TESTS}/pytest` tests are moved within `tests` we have to run them separately and pass in the path to the
# `conftest.py` explicitly, because otherwise it won't be able to find the fixtures it provides
Expand Down
3 changes: 0 additions & 3 deletions aiida/manage/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
# pylint: disable=wildcard-import

from .main import *
from .unittest_classes import *

__all__ = (
'PluginTestCase',
'ProfileManager',
'TemporaryProfileManager',
'TestManager',
'TestManagerError',
'TestRunner',
'get_test_backend_name',
'get_test_profile_name',
'get_user_dict',
Expand Down
6 changes: 4 additions & 2 deletions aiida/manage/tests/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,16 @@ def __init__(self, profile_name):
:param profile_name: Name of the profile to be loaded
"""
from aiida import load_profile
from aiida.storage.testbase import check_if_tests_can_run

self._profile = None
try:
self._profile = load_profile(profile_name)
except Exception:
raise TestManagerError(f'Unable to load test profile `{profile_name}`.')
check_if_tests_can_run()
if self._profile is None:
raise TestManagerError(f'Unable to load test profile `{profile_name}`.')
if not self._profile.is_test_profile:
raise TestManagerError(f'Profile `{profile_name}` is not a valid test profile.')

@staticmethod
def clear_profile():
Expand Down
100 changes: 0 additions & 100 deletions aiida/manage/tests/unittest_classes.py

This file was deleted.

Loading