diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-09 12:10:10 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-09-09 12:10:10 -0400 |
commit | 931de83e0e0089f196b7bc792d652112f05d8a8d (patch) | |
tree | 0a54a434fc7becbed55319634a9a615ece4733cc | |
parent | 99749650416d096a67e6286b5ea91a67f293a60d (diff) | |
download | alembic-931de83e0e0089f196b7bc792d652112f05d8a8d.tar.gz |
- add a tox.ini file
- update the readme.unittests a bit
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | README.unittests.rst (renamed from README.unittests) | 9 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tox.ini | 36 |
4 files changed, 44 insertions, 5 deletions
@@ -5,7 +5,7 @@ dist/ /docs/build/output/ *.orig alembic.ini -tox.ini .venv *.egg-info .coverage +.tox diff --git a/README.unittests b/README.unittests.rst index 61796b6..b84aa7a 100644 --- a/README.unittests +++ b/README.unittests.rst @@ -1,14 +1,17 @@ Running Unit Tests ================== -Tests can be run using the nosetests runner: +Tests can be run be run using via py.test, nose, or the Python setup.py script:: - nosetests -v + py.test -Or via the setup.py script: + nosetests -v python setup.py test +There's also a tox.ini file with several configurations:: + + tox Setting up Optional Databases ------------------------------ @@ -16,6 +16,6 @@ identity = C4DAFEE1 [pytest] addopts= --tb native -v -r fxX -python_files=tests/*test_*.py +python_files=tests/test_*.py @@ -0,0 +1,36 @@ +[tox] +envlist = full + +[testenv] +deps=pytest + flake8 + coverage + mock + +sitepackages=True +usedevelop=True + +commands= + python -m pytest {posargs} + +[testenv:full] + + +[testenv:coverage] + +commands= + python -m pytest \ + --cov=alembic \ + {posargs} + python -m coverage xml --include=alembic/* + +[testenv:pep8] +commands = python -m flake8 {posargs} + + +[flake8] + +show-source = True +ignore = E711,E712,E721,F841,F811 +exclude=.venv,.git,.tox,dist,doc,*egg,build + |