Skip to content

Commit

Permalink
Remove aiida.tests entry point group and parser_tests
Browse files Browse the repository at this point in the history
The `aiida_tests` entry point was added as a temporary replacement until
the plugin test fixtures came available. These have been available for a
while now and since no plugins rely on the entry point group we remove
it. Additionally, the `test_parsers` was a first implementation to test
parser plugins, but this can be done more elegantly with `pytest` and
the plugin fixtures, therefore it is removed.
  • Loading branch information
sphuber committed Apr 18, 2019
1 parent 5c17bda commit d0ac414
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 299 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
aiida/backends/tests/test_nodes.py|
aiida/backends/tests/orm/data/test_remote.py|
aiida/backends/tests/orm/utils/test_loaders.py|
aiida/backends/tests/test_parsers.py|
aiida/backends/tests/test_caching_config.py|
aiida/backends/tests/test_plugin_loader.py|
aiida/backends/tests/engine/test_class_loader.py|
Expand Down
11 changes: 0 additions & 11 deletions aiida/backends/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
'orm.utils.loaders': ['aiida.backends.tests.orm.utils.test_loaders'],
'orm.utils.repository': ['aiida.backends.tests.orm.utils.test_repository'],
'parsers.parser': ['aiida.backends.tests.parsers.test_parser'],
'parsers': ['aiida.backends.tests.test_parsers'],
'plugin_loader': ['aiida.backends.tests.test_plugin_loader'],
'query': ['aiida.backends.tests.test_query'],
'restapi': ['aiida.backends.tests.test_restapi'],
Expand All @@ -147,11 +146,6 @@ def get_db_test_names():
for name in DB_TEST_LIST[backend]:
retlist.append(name)

# This is a temporary solution to be able to run tests in plugins. Once the plugin fixtures
# have been made working and are released, we can replace this logic with them
for entrypoint in [ep for ep in ENTRYPOINT_MANAGER.iter_entry_points(group='aiida.tests')]:
retlist.append(entrypoint.name)

# Explode the list so that if I have a.b.c,
# I can run it also just with 'a' or with 'a.b'
final_list = [_ for _ in retlist]
Expand Down Expand Up @@ -197,11 +191,6 @@ def get_db_test_list():
for test in tests:
retdict[k].append(test)

# This is a temporary solution to be able to run tests in plugins. Once the plugin fixtures
# have been made working and are released, we can replace this logic with them
for entrypoint in [ep for ep in ENTRYPOINT_MANAGER.iter_entry_points(group='aiida.tests')]:
retdict[entrypoint.name].append(entrypoint.module_name)

# Explode the dictionary so that if I have a.b.c,
# I can run it also just with 'a' or with 'a.b'
final_retdict = defaultdict(list)
Expand Down
284 changes: 0 additions & 284 deletions aiida/backends/tests/test_parsers.py

This file was deleted.

3 changes: 1 addition & 2 deletions aiida/plugins/entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
try:
from reentry.default_manager import PluginManager
# I don't use the default manager as it has scan_for_not_found=True
# by default, which re-runs scan if no entrypoints are found (which is
# quite possible if no aiida.tests entrypoints are registered)
# by default, which re-runs scan if no entrypoints are found
ENTRYPOINT_MANAGER = PluginManager(scan_for_not_found=False)
except ImportError:
import pkg_resources as ENTRYPOINT_MANAGER
Expand Down
1 change: 0 additions & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
"local = aiida.transports.plugins.local:LocalTransport",
"ssh = aiida.transports.plugins.ssh:SshTransport"
],
"aiida.tests": [],
"aiida.tools.calculations": [],
"aiida.tools.dbexporters": [],
"aiida.tools.dbimporters": [
Expand Down

0 comments on commit d0ac414

Please sign in to comment.