【Pytest】pytestでカバレッジ率を出してみる

コンテナに入る

docker compose exec app bash

pytest-covをインストール

pip install pytest-cov

実行

普通にpytestを実行するコマンドに–covオプションを付けるだけ。

pytest tests --cov

以上になります。
お読み頂き、ありがとうございました。