Skip to content

Commit

Permalink
Add tox-based tests support
Browse files Browse the repository at this point in the history
Change-Id: I01715ba96a062e7a297b3f8ccbbbcbb7bff83763
  • Loading branch information
kazum committed Mar 26, 2014
1 parent 6232baa commit 9a8e79f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hacking
sphinx
nose
coverage
34 changes: 34 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[tox]
envlist = py26,py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
deps =
https://launchpad.net/swift/icehouse/1.13.0/+download/swift-1.13.0.tar.gz
-r{toxinidir}/test-requirements.txt
commands = nosetests {posargs:swift3/test/unit}
setenv = VIRTUAL_ENV={envdir}

[testenv:pep8]
commands = flake8

[testenv:venv]
commands = {posargs}

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
NOSE_WITH_COVERAGE=1
NOSE_COVER_PACKAGE=swift3

[tox:jenkins]
downloadcache = ~/cache/pip

[flake8]
# follow the same style guidelines with swift
ignore = H
select = H102,H103,H201,H501,H903
exclude = .venv,.git,.tox,dist,doc,*egg,build
show-source = True

0 comments on commit 9a8e79f

Please sign in to comment.