File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 22
33# Test/Dev
44DEV_CMD =cd intbot && DJANGO_ENV="dev" uv run --env-file .env -- ./manage.py
5- TEST_CMD =cd intbot && DJANGO_SETTINGS_MODULE="intbot.settings" DJANGO_ENV="test" uv run pytest --nomigrations
5+ TEST_CMD=DJANGO_SETTINGS_MODULE ="intbot.settings" DJANGO_ENV="test" uv run pytest --nomigrations
66UV_RUN_DEV =cd intbot && DJANGO_ENV="dev" uv run
77
88# Docker
@@ -61,6 +61,9 @@ test/fast:
6161 # skip slow tests
6262 $(TEST_CMD ) -s -v -m " not slow"
6363
64+ test/cov :
65+ $(TEST_CMD ) --cov=. --cov-report=term
66+
6467
6568lint :
6669 # '.' because UV_RUN_DEV implies cd to intbot/
Original file line number Diff line number Diff line change @@ -20,4 +20,25 @@ dependencies = [
2020 " gunicorn>=23.0.0" ,
2121 " django-stubs>=5.1.1" ,
2222 " pdbpp>=0.10.3" ,
23+ " pytest-cov>=6.0.0" ,
24+ ]
25+
26+ [tool .pytest .ini_options ]
27+ pythonpath = [
28+ " intbot"
29+ ]
30+
31+ [tool .coverage .run ]
32+ branch = true
33+ omit = [
34+ " */migrations/*" ,
35+ " manage.py" ,
36+ ]
37+
38+ [tool .coverage .report ]
39+ show_missing = true
40+ exclude_lines = [
41+ " if 0:" ,
42+ " def __repr__" ,
43+ " def __str__" ,
2344]
You can’t perform that action at this time.
0 commit comments