We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd1f120 commit ff8ee5aCopy full SHA for ff8ee5a
src/DIRAC/Core/Utilities/test/Test_entrypoints.py
@@ -0,0 +1,16 @@
1
+import importlib_metadata as metadata
2
+import pytest
3
+import six
4
+
5
6
+@pytest.mark.skipif(six.PY2, reason="Only makes sense for Python 3 installs")
7
+def test_entrypoints():
8
+ """Make sure all console_scripts defined by DIRAC are importable."""
9
+ errors = []
10
+ for ep in metadata.entry_points(group="console_scripts"): # pylint: disable=unexpected-keyword-arg
11
+ if ep.module.startswith("DIRAC"):
12
+ try:
13
+ ep.load()
14
+ except ModuleNotFoundError as e: # pylint: disable=undefined-variable
15
+ errors.append(str(e))
16
+ assert not errors, errors
0 commit comments