mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Refactor testing setup (#220)
* Refactor tox and travis config files Separates flake8 and isort into separate tox tasks Tie flake8 and isort to specific python version so they only run once on Travis Add python3.7 to tested python versions * Requires newer Xenial base * Running Xenial on Travis requires sudo Move coveralls submission to travis config to avoid triggering during local runs. * Require all tests to be run Clean up test generation code form test_fi.py Perform coverage measurement of tests Fail tox if coverage of tests directory isn't at 100% * Further Tox refactoring Measure project coverage explicitly instead of omitting non-project files from reporting Add branch measurement to coverage Only report to coveralls if a .coverage result file exists Make dependencies for each testenv explict and only include requried deps * Small readme update to trigger travis Add overly brief message about installing and running tox * Fix unescaped flake8 violations Unescaped \w -> \\w and \e to \\e in regex patterns found with updated flake8
This commit is contained in:
committed by
Ernesto Rodriguez Ortiz
parent
c606fd54e8
commit
5c9bce19e4
25
tox.ini
25
tox.ini
@@ -1,15 +1,28 @@
|
||||
[tox]
|
||||
envlist = flake8,isort,py27,py34,py35,py36
|
||||
envlist = flake8,isort,py27,py34,py35,py36,py37
|
||||
|
||||
[testenv]
|
||||
passenv = TRAVIS TRAVIS_*
|
||||
deps =
|
||||
-r{toxinidir}/requirements-test.txt
|
||||
coverage
|
||||
delegator.py
|
||||
commands =
|
||||
flake8
|
||||
isort --check-only --recursive --diff num2words tests
|
||||
coverage erase
|
||||
coverage run -m unittest discover
|
||||
coverage report --fail-under=75 --omit=.tox/*,tests/*,/usr/*
|
||||
coveralls
|
||||
coverage report --fail-under=100 --include=tests/* --skip-covered
|
||||
|
||||
[testenv:flake8]
|
||||
changedir = {toxinidir}
|
||||
deps =
|
||||
flake8
|
||||
flake8-copyright
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:isort]
|
||||
changedir = {toxinidir}
|
||||
deps =
|
||||
isort
|
||||
delegator.py
|
||||
commands =
|
||||
isort --check-only --recursive --diff num2words tests
|
||||
|
||||
Reference in New Issue
Block a user