Skip to content

Commit bd99832

Browse files
Catch all cases of missing pytest
Command `pytest` is not available on distributions such as Ubuntu 22.04, where only `pytest-3`/`py.test-3` are available.
1 parent 458de80 commit bd99832

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ flake8:
5454
flake8
5555

5656
pytest:
57-
pytest codespell_lib
57+
@if command -v pytest > /dev/null; then \
58+
pytest codespell_lib
59+
else \
60+
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
61+
exit 1; \
62+
fi
5863

5964
clean:
6065
rm -rf codespell.1

0 commit comments

Comments
 (0)