-
Notifications
You must be signed in to change notification settings - Fork 409
/
Makefile
38 lines (27 loc) · 985 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: all test tests test_watch test_coverage test_profile pre_commit help
# Default target executed when no specific target is provided to make.
all: help
# Define a variable for the test file path.
TEST_FILE ?= tests/
test:
poetry run pytest $(TEST_FILE)
tests:
poetry run pytest $(TEST_FILE)
test_watch:
poetry run ptw --snapshot-update --now . -- -vv $(TEST_FILE)
test_coverage:
poetry run pytest --cov=$(TEST_FILE) --cov-report=term-missing
test_profile:
poetry run pytest -vv tests/ --profile-svg
pre_commit:
pre-commit install
pre-commit run --all-files
# HELP
help:
@echo '----'
@echo 'test - run unit tests'
@echo 'tests - run unit tests'
@echo 'test TEST_FILE=<test_file> - run all tests in given file'
@echo 'test_watch - run unit tests in watch mode'
@echo 'test_coverage - run unit tests with coverage'
@echo 'pre_commit - run pre-commit hooks'