From 73d0497ad63ee7e3386af5d1e8e01f5a563e902a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 31 Oct 2022 18:03:37 +0100 Subject: [PATCH] Catch all cases of missing pytest (#2568) Command `pytest` is not available on distributions such as Ubuntu 22.04, where only `pytest-3`/`py.test-3` are available. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5cbe5e0990..1757974280 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,12 @@ flake8: flake8 pytest: - pytest codespell_lib + @if command -v pytest > /dev/null; then \ + pytest codespell_lib; \ + else \ + echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ + exit 1; \ + fi clean: rm -rf codespell.1