From d81500536b672e9b228dd5ed02d2b86f142bf829 Mon Sep 17 00:00:00 2001 From: Rust Saiargaliev Date: Fri, 27 Oct 2023 13:30:33 +0200 Subject: [PATCH] [dev] Add pytest-cov to improve DX --- CHANGELOG.md | 3 ++- pyproject.toml | 3 ++- tox.ini | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d120724..f0e9c897 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 4aa45618..2e4287a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ test = [ "coverage", "pillow", "pytest", + "pytest-cov", "pytest-django", "black", "ruff", @@ -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" diff --git a/tox.ini b/tox.ini index 6ba27d10..3989dc16 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,7 @@ deps = coverage pillow pytest + pytest-cov pytest-django django32: Django==3.2 django41: Django>=4.1,<4.2