subunit2sql/tox.ini
Matthew Treinish 7948c0e026 Add migration to populate run_time where needed
The existing migration to add an avg run_time column to the tests table
neglected to calculate the run_time for existing rows and instead just
added a NULL value. Since this migration is part of a released version
of subunit2sql it's too late to add support for adding a run_time to
the columns where it makes sense. This commit adds a new migration
that will add the avg run_time for each test in the tests table where
there are successful test runs and the run_time is still set to NULL.

Additionally there were a couple of fixes around adding migrations
that needed to be added here, mostly just changing the base
alembic.ini to reflect the new relative path of the migration dir and
ignoring an additional pep8 rule which conflicted with the sqlalchemy
syntax.

Change-Id: I0b9c673106c41e9e66a2be5da6ebe9ca58d0ad36
2014-10-06 22:32:45 +00:00

41 lines
1.1 KiB
INI

[tox]
minversion = 1.6
envlist = py27,py34,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
sitepackages = False
commands =
flake8 {posargs}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# H402 skipped because some docstrings aren't sentences
# E123 skipped because it is ignored by default in the default pep8
# E129 skipped because it is too limiting when combined with other rules
# H305 skipped because it is inconsistent between python versions
# E711 skipped because sqlalchemy filter() requires using == instead of is
ignore = E125,H402,E123,E129,H305,E711
exclude = .venv,.git,.tox,dist,doc,*egg,build