File tree Expand file tree Collapse file tree 6 files changed +165
-34
lines changed
Expand file tree Collapse file tree 6 files changed +165
-34
lines changed Original file line number Diff line number Diff line change 1919 uv sync --locked
2020 - name : Run coverage
2121 run : |
22- coverage run -m nose
22+ coverage run -m pytest
2323 # .coverage.* files are ignored by git
2424 coverage report -m | tee .coverage.out
2525 percent=$(grep -E '^TOTAL\s.+\s[0-9]{1,3}%$' .coverage.out \
Original file line number Diff line number Diff line change 5757 "HOST":"localhost",
5858 "PORT":"5432"
5959 }
60- run : nosetests -v --with-coverage --cover-branches --cover-package=field_audit
60+ run : pytest --cov=field_audit --cov-branch -v
6161 continue-on-error : ${{ matrix.experimental }}
6262 - name : Check migrations
6363 run : |
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ your local Python's `sqlite3` library ships with the `JSON1` extension enabled
258258
259259- Tests
260260 ``` shell
261- uv run nosetests
261+ uv run pytest
262262 ```
263263
264264- Style check
@@ -268,7 +268,7 @@ your local Python's `sqlite3` library ships with the `JSON1` extension enabled
268268
269269- Coverage
270270 ``` shell
271- uv run coverage run -m nose
271+ uv run coverage run -m pytest
272272 uv run coverage report -m
273273 ```
274274
@@ -292,7 +292,6 @@ Publishing is automated with [Github Actions](.github/workflows/pypi.yml).
292292- Implement auditing for the remaining "special" QuerySet write operations:
293293 - ` bulk_update() `
294294- Write full library documentation using github.io.
295- - Switch to ` pytest ` to support Python 3.10.
296295
297296### Backlog
298297
Original file line number Diff line number Diff line change @@ -39,10 +39,18 @@ name = "field_audit"
3939[tool .uv ]
4040dev-dependencies = [
4141 " coverage" ,
42- " pynose" ,
42+ " pytest" ,
43+ " pytest-cov" ,
44+ " pytest-django" ,
4345 " ruff" ,
4446]
4547
48+ [tool .pytest .ini_options ]
49+ DJANGO_SETTINGS_MODULE = " tests.settings"
50+ addopts = " --tb=short --strict-markers --strict-config"
51+ python_files = [" tests.py" , " test_*.py" , " *_test.py" ]
52+ testpaths = [" tests" ]
53+
4654[build-system ]
4755requires = [" flit_core >=3.2,<4" ]
4856build-backend = " flit_core.buildapi"
Original file line number Diff line number Diff line change 1010
1111
1212def setup ():
13- """Initialize database for nosetests """
13+ """Initialize database for pytest """
1414 init_db ()
1515
1616
You can’t perform that action at this time.
0 commit comments