| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 [tox] | 1 [tox] |
| 2 envlist = py27,py35,py36,pypy,coverage,flake8 | 2 envlist = py27,py35,py36,pypy,flake8 |
| 3 | 3 |
| 4 [flake8] | 4 [flake8] |
| 5 ignore = D107, N801, W503 | 5 ignore = D107, N801, W503 |
| 6 | 6 |
| 7 [testenv] | 7 [testenv] |
| 8 deps = | 8 deps = |
| 9 pytest | |
| 10 mock | |
| 11 commands = | |
| 12 py.test tests | |
| 13 | |
| 14 [testenv:coverage] | |
| 15 deps = | |
| 16 pytest-cov | 9 pytest-cov |
| 17 mock | 10 mock |
| 18 commands = | 11 commands = |
| 19 py.test --cov=abp --cov-report=term-missing tests | 12 # For accurate coverage reports, we write a `pragma: no py{}` instruction |
| 13 # containing the current Python version to a .coveragerc file | |
|
Sebastian Noack
2019/01/03 05:22:03
Nit: The additional trailing spaces in the comment
rhowell
2019/01/03 21:32:29
I'm guessing you mean the leading spaces here? Yea
Sebastian Noack
2019/01/03 21:44:23
Sorry, I meant leading spaces of course.
| |
| 14 python -c 'import sys; open(".coveragerc", "w").write("[report]\nexclude_lin es = pragma: no py\{\} cover".format(sys.version_info[0]))' | |
| 15 py.test --cov=abp --cov-report=term-missing --cov-fail-under=100 tests | |
| 20 | 16 |
| 21 # We have to install our package in development mode | 17 # We have to install our package in development mode so that pytest-cov can |
| 22 # so that pytest-cov can find the .coverage file. | 18 # find the .coverage and .coveragerc files. |
| 23 usedevelop = true | 19 usedevelop = true |
| 24 | 20 |
| 25 [testenv:flake8] | 21 [testenv:flake8] |
| 26 basepython = python3 | 22 basepython = python3 |
| 27 skip_install = true | 23 skip_install = true |
| 28 deps = | 24 deps = |
| 29 flake8 | 25 flake8 |
| 30 flake8-docstrings | 26 flake8-docstrings |
| 31 flake8-commas | 27 flake8-commas |
| 32 pep8-naming | 28 pep8-naming |
| 33 hg+https://hg.adblockplus.org/codingtools#egg=flake8-eyeo&subdirectory=flake 8-eyeo | 29 hg+https://hg.adblockplus.org/codingtools#egg=flake8-eyeo&subdirectory=flake 8-eyeo |
| 34 commands = | 30 commands = |
| 35 flake8 abp | 31 flake8 abp |
| 36 flake8 --extend-ignore=D1 tests setup.py | 32 flake8 --extend-ignore=D1 tests setup.py |
| OLD | NEW |