Skip to content

Commit

Permalink
buildout and tox
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed May 3, 2017
1 parent dd3fc5c commit a6b4272
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,7 @@ parts
*.pyo
*.so
*.egg-info

.coverage*
/.python-version
/.tox/
7 changes: 7 additions & 0 deletions buildout.cfg
Expand Up @@ -6,6 +6,13 @@ extends =
https://raw.githubusercontent.com/zopefoundation/Zope/master/sources.cfg

develop = .

sources-dir = develop

auto-checkout =
RestrictedPython
AccessControl

parts =
interpreter
test
Expand Down
63 changes: 63 additions & 0 deletions tox.ini
@@ -0,0 +1,63 @@
[tox]
envlist =
# flake8,
py27,
#py34,
#py35,
#py36,
#pypy,
#pypy3,
# isort,
# coverage-report,

skip_missing_interpreters = False

[testenv]
usedevelop = True
extras =
develop
test

install_command = pip install --no-cache-dir --no-binary=:all: {opts} {packages}

commands =
coverage run {envbindir}/zope-testrunner --path=src --all {posargs:-pvc}
deps =
.[test]
zope.testrunner
coverage
git+https://github.com/zopefoundation/RestrictedPython.git@Python3_update#egg=RestrictedPython
git+https://github.com/zopefoundation/AccessControl.git@py3-pure-python#egg=AccessControl
setenv =
PIP_NO_CACHE = 1
COVERAGE_FILE=.coverage.{envname}

[testenv:coverage-report]
basepython = python2.7
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report

[testenv:isort]
basepython = python2.7
deps = isort
commands =
isort --check-only --recursive {toxinidir}/src {toxinidir}/tests {posargs}

[testenv:isort-apply]
basepython = python2.7
deps = isort
commands =
isort --apply --recursive {toxinidir}/src {toxinidir}/tests {posargs}

[testenv:flake8]
basepython = python2.7
deps = flake8
commands = flake8 --doctests src tests setup.py

0 comments on commit a6b4272

Please sign in to comment.