]> git.phdru.name Git - sqlconvert.git/commitdiff
Use coverage and tox for testing
authorOleg Broytman <phd@phdru.name>
Tue, 20 Sep 2016 23:45:58 +0000 (02:45 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 20 Sep 2016 23:45:58 +0000 (02:45 +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 cbf159e6ec209409aac6c2871cec8ded8d6ec248..be296d601c7ada01744f97352d374867ac705b2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,23 +1,23 @@
 Version 0.0.6 (2016-09-??)
 
-    Condense a sequence of newlines after a /*! directive */;
+   Condense a sequence of newlines after a /*! directive */;
 
-    Rename remove_directives -> remove_directive_tokens.
+   Rename remove_directives -> remove_directive_tokens.
 
-    Unescape strings.
+   Unescape strings.
 
-    Use pytest for testing.
+   Use pytest, coverage and tox for testing.
 
 Version 0.0.5 (2016-09-07)
 
-    Remove /*! directives */; and newlines after them.
+   Remove /*! directives */; and newlines after them.
 
-    Join group-{file,sql}.py into demo-group.py
-         parse-{file,sql}.py into demo-parse.py.
+   Join group-{file,sql}.py into demo-group.py
+        parse-{file,sql}.py into demo-parse.py.
 
-    Add demo-process.py.
+   Add demo-process.py.
 
-    Fix: flush buffer and outfile.
+   Fix: flush buffer and outfile.
 
 Version 0.0.4 (2016-09-04)
 
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..dec4e03
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,41 @@
+[tox]
+minversion = 1.8
+envlist = {py26,py27,py34},{py27,py34}-flake8
+
+# Base test environment settings
+[testenv]
+deps =
+    sqlparse
+    pytest
+    pytest-cov
+    py26: argparse
+    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}/sqlconvert
+
+[testenv:py26]
+commands = {[general]commands}
+
+[testenv:py27]
+commands = {[general]commands}
+
+[testenv:py34]
+commands = {[general]commands}
+
+[testenv:py27-flake8]
+deps =
+    flake8
+commands = flake8 demo scripts sqlconvert tests
+
+[testenv:py34-flake8]
+deps =
+    flake8
+commands = flake8 demo scripts sqlconvert tests