]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- add a tox.ini file
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Sep 2014 16:10:10 +0000 (12:10 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Sep 2014 16:10:10 +0000 (12:10 -0400)
- update the readme.unittests a bit

.gitignore
README.unittests.rst [moved from README.unittests with 86% similarity]
setup.cfg
tox.ini [new file with mode: 0644]

index 93554cb68e07048b62de833c7ab9cc950061259c..a252ee8eeb0beb8a3d0b7fa247cdeb75ffc998d9 100644 (file)
@@ -5,7 +5,7 @@ dist/
 /docs/build/output/
 *.orig
 alembic.ini
-tox.ini
 .venv
 *.egg-info
 .coverage
+.tox
similarity index 86%
rename from README.unittests
rename to README.unittests.rst
index 61796b61d353c8d65a92be80d8a069b936549264..b84aa7a6f6d5b96f6dc38646456fac2173fb5af4 100644 (file)
@@ -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
 ------------------------------
index 530eb95e15cb1606d70ebba0c00002a5dada933e..0052af881d4838b591d3bf9f1b3c44e7ae330813 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -16,6 +16,6 @@ identity = C4DAFEE1
 
 [pytest]
 addopts= --tb native -v -r fxX
-python_files=tests/*test_*.py
+python_files=tests/test_*.py
 
 
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..61da07d
--- /dev/null
+++ b/tox.ini
@@ -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
+