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 d772e0c commit 1dab13eCopy full SHA for 1dab13e
.spin/cmds.py
@@ -1,4 +1,6 @@
1
+import importlib
2
import sys
3
+import textwrap
4
5
import click
6
from spin.cmds.util import run
@@ -14,6 +16,20 @@
14
16
)
15
17
def test(pytest_args, coverage=False):
18
"""🔧 Run tests"""
19
+ if not importlib.util.find_spec("lazy_loader"):
20
+ click.secho(
21
+ textwrap.dedent("""\
22
+ ERROR: The package is not installed.
23
+
24
+ Please do an editable install:
25
26
+ pip install -e .[test]
27
28
+ prior to running the tests."""),
29
+ fg="red",
30
+ )
31
+ sys.exit(1)
32
33
if coverage:
34
pytest_args = ("--cov=lazy_loader", *pytest_args)
35
run([sys.executable, "-m", "pytest", *list(pytest_args)])
0 commit comments