fix for python 2.7 test dependency and added a tox.ini file

This commit is contained in:
Shay Palachy
2017-04-20 12:08:44 +03:00
parent 5519745598
commit 902aff1e7e
5 changed files with 69 additions and 14 deletions
+28
View File
@@ -0,0 +1,28 @@
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
ignore: Tests
status:
patch:
default:
target: '80'
project: false
comment:
layout: header, changes, diff
behavior: default
require_changes: false
branches: null
flags: null
paths: null
ignore:
- "versioneer.py"
- "tests"
- "**/_version.py"
- "**/__init__.py"
+8 -1
View File
@@ -5,4 +5,11 @@ omit =
cachier/_version.py
cachier/__init__.py
[report]
show_missing = True
show_missing = True
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
+1 -1
View File
@@ -12,7 +12,7 @@ before_install:
- pip install codecov
install:
# Coveralls 4.0 doesn't support Python 3.2
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then travis_retry pip install repoze; fi
- if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then travis_retry pip install repoze.lru; fi
- pip install ".[test]"
script: pytest --cov=pcachier
# submit coverage
-12
View File
@@ -1,12 +0,0 @@
comment:
layout: header, changes, diff
coverage:
status:
patch:
default:
target: '80'
project: false
ignore:
- "tests"
- "**/_version.py"
- "**/__init__.py"
+32
View File
@@ -0,0 +1,32 @@
[tox]
envlist =
py35
# doctesting
;,py36
# recreate = True
[testenv]
deps =
; equivalent to pip -e .[test]
-e{toxinidir}[test]
;-r{toxinidir}/tools/pip-requires
;-r{toxinidir}/tools/test-require
commands=py.test # or 'nosetests' or ...
usedevelop = true
# [testenv:doctesting]
# basepython = python
# usedevelop=True
# skipsdist=True
# commands=
# pytest --doctest-modules --pyargs _pytest
[pytest]
testpaths =
tests
cachier
norecursedirs=dist build .tox
addopts =
# --doctest-modules
--cov=cachier