]> git.phdru.name Git - m_librarian.git/commitdiff
Use coverage and tox for testing
authorOleg Broytman <phd@phdru.name>
Tue, 20 Sep 2016 23:40:09 +0000 (02:40 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 20 Sep 2016 23:40:09 +0000 (02:40 +0300)
.gitignore
ChangeLog
requirements_dev.txt
tox.ini [new file with mode: 0644]

index 539da7411f1d5a03e01b75c76fb3a76d16fbdc2f..427ca64189bfe83038320af4b07ea99e6fa9f089 100644 (file)
@@ -1 +1,3 @@
+.cache/
+.tox/
 *.py[co]
index 7367ef1e034fff7539ee61b0a0d91fa13b7787d7..f2174df429f5b2fb0c63ccce69f9c7a4dca88a56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 Version 0.0.15 (2016-07-??)
 
-   Use pytest for testing.
+   Use pytest, coverage and tox for testing.
 
 Version 0.0.14 (2016-07-29)
 
index 73c8ac6f99706acbcad1e859fdc54ffda340a5e1..ca2ff5d62c0481b2a56e73b65df745bfdd065c5b 100644 (file)
@@ -1,3 +1,5 @@
 -r requirements.txt
 
 pytest
+pytest-cov
+tox >= 1.8
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..596e198
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,42 @@
+[tox]
+minversion = 1.8
+envlist = {py26,py27,py34},{py27,py34}-flake8
+
+# Base test environment settings
+[testenv]
+deps =
+    pytest
+    pytest-cov
+    py26: argparse
+    py26,py27: SQLObject>=2.2.1
+    py34: SQLObject>=3.0.0
+    py26,py27: m_lib>=2.0
+    py34: m_lib>=3.0
+sitepackages = True
+# Don't fail or warn on uninstalled commands
+whitelist_externals =
+    flake8
+    py.test
+
+[general]
+commands =
+    python /usr/local/bin/py.test --cov={envsitepackagesdir}/m_librarian
+
+[testenv:py26]
+commands = {[general]commands}
+
+[testenv:py27]
+commands = {[general]commands}
+
+[testenv:py34]
+commands = {[general]commands}
+
+[testenv:py27-flake8]
+deps =
+    flake8
+commands = flake8 m_librarian scripts test
+
+[testenv:py34-flake8]
+deps =
+    flake8
+commands = flake8 m_librarian scripts test