Skip to content

Commit

Permalink
[dev] Add pytest-cov to improve DX
Browse files Browse the repository at this point in the history
  • Loading branch information
amureki committed Oct 27, 2023
1 parent 532597b commit 40fbaef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased](https://github.com/model-bakers/model_bakery/tree/main)

### Added
- [dev] Add `pytest-cov` to improve DX

### Changed
- Remove unnecessary casting to string methods random_gen.gen_slug and random_gen.gen_string
- Remove unnecessary casting to string methods `random_gen.gen_slug` and `random_gen.gen_string`

### Removed

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ test = [
"coverage",
"pillow",
"pytest",
"pytest-cov",
"pytest-django",
"black",
"ruff",
Expand Down Expand Up @@ -92,7 +93,7 @@ ignore_missing_imports = true
disallow_untyped_calls = true

[tool.pytest.ini_options]
addopts = "--tb=short -rxs --nomigrations"
addopts = "--cov --tb=short -rxs --nomigrations"

[tool.ruff]
target-version = "py38"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ deps =
coverage
pillow
pytest
pytest-cov
pytest-django
django32: Django==3.2
django41: Django>=4.1,<4.2
Expand All @@ -31,5 +32,4 @@ deps =
postgresql-psycopg3: psycopg
commands =
python \
-m coverage run \
-m pytest {posargs:tests}

0 comments on commit 40fbaef

Please sign in to comment.