LoginSignup
11
11

More than 5 years have passed since last update.

pytestを使ってカバレージとか取りながら分割実行してテスト実行時間を短縮する

Posted at

autopep8での例

インストール

$ pip install pytest
$ pip install pytest-cov
$ pip install pytest-xdist

coverage用の設定ファイル

.coveragerc
[run]
branch = True
omit = '*/site-packages/*'

[report]
include = autopep8.py

実行

$ AUTOPEP8_COVERAGE=1 py.test -n4 --cov-config .coveragerc ¥
  --cov-report html --cov-report xml --cov-report term-missing ¥
  --cov project test/test_project.py
11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11