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 2
2
3
3
# Test/Dev
4
4
DEV_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
6
6
UV_RUN_DEV =cd intbot && DJANGO_ENV="dev" uv run
7
7
8
8
# Docker
@@ -61,6 +61,9 @@ test/fast:
61
61
# skip slow tests
62
62
$(TEST_CMD ) -s -v -m " not slow"
63
63
64
+ test/cov :
65
+ $(TEST_CMD ) --cov=. --cov-report=term
66
+
64
67
65
68
lint :
66
69
# '.' because UV_RUN_DEV implies cd to intbot/
Original file line number Diff line number Diff line change @@ -20,4 +20,25 @@ dependencies = [
20
20
" gunicorn>=23.0.0" ,
21
21
" django-stubs>=5.1.1" ,
22
22
" 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__" ,
23
44
]
You can’t perform that action at this time.
0 commit comments