567408f42a
This change adds a gabbi.driver.py_test_generator function which can be used to generate gabbi tests that can be run by py.test. This works except for one important but not necessarily critical feature: If you select one test from a gabbit (using the -k arg to py.test) the test.prior stack is traverse to the first test and that first test is run, but the others are not. We may be able to figure out to fix this, but for now I don't have any ideas. I believe this change is still useful without that feature, but it will need to be heavily documented. Next steps: * documentation * explore options for dealing with prior
58 lines
1.2 KiB
INI
58 lines
1.2 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = py27,py33,py34,py35,pypy,pep8,limit,failskip,docs,py35-prefix,py35-limit,py35-failskip,py27-pytest,py35-pytest
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
install_command = pip install -U {opts} {packages}
|
|
usedevelop = True
|
|
commands = python setup.py testr --testr-args="{posargs}"
|
|
|
|
[testenv:venv]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = {posargs}
|
|
|
|
[testenv:py27-pytest]
|
|
commands = py.test gabbi
|
|
|
|
[testenv:py35-pytest]
|
|
commands = py.test gabbi
|
|
|
|
[testenv:py35-prefix]
|
|
setenv = GABBI_PREFIX=/snoopy
|
|
|
|
[testenv:pep8]
|
|
deps = hacking
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:limit]
|
|
commands = {toxinidir}/test-limit.sh
|
|
|
|
[testenv:failskip]
|
|
commands = {toxinidir}/test-failskip.sh
|
|
|
|
[testenv:py35-limit]
|
|
commands = {toxinidir}/test-limit.sh
|
|
|
|
[testenv:py35-failskip]
|
|
commands = {toxinidir}/test-failskip.sh
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args="{posargs}"
|
|
|
|
[testenv:docs]
|
|
commands =
|
|
rm -rf doc/build
|
|
python setup.py build_sphinx
|
|
whitelist_externals =
|
|
rm
|
|
|
|
[flake8]
|
|
ignore = H405,E126
|
|
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,docs
|
|
show-source = True
|