summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2015-07-13 18:45:49 +0200
committerThomas Waldmann <tw@waldmann-edv.de>2015-07-13 18:45:49 +0200
commit43bc1d5b6afaf67b856407cbcd7813519ba34e79 (patch)
tree1d8a2b6842b816c3fc076920f9ec567b24fc0eaf /tox.ini
parent2deb520e671cfbe0f8cff3b1152604958fe49118 (diff)
improved tox configuration, documented there how to invoke it
the usage of some py.test features in the previous locking changesets somehow broke the test environment. it seems to help to point py.test to some specific package or module (and not just invoke "py.test" without arguments).
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini24
1 files changed, 20 insertions, 4 deletions
diff --git a/tox.ini b/tox.ini
index 68d2e6a61..79603cda9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,11 +1,27 @@
+# tox configuration - if you change anything here, run this to verify:
+# fakeroot -u tox --recreate
+#
+# Invokation examples:
+# fakeroot -u tox # run all tests
+# fakeroot -u tox -e py32 # run all tests, but only on python 3.2
+# fakeroot -u tox borg.testsuite.locking # only run 1 test module
+# fakeroot -u tox borg.testsuite.locking -- -k '"not Timer"' # exclude some tests
+# fakeroot -u tox borg.testsuite -- -v # verbose py.test
+#
+# Important notes:
+# Without fakeroot -u some tests will fail.
+# When using -- to give options to py.test, you MUST also give borg.testsuite[.module].
+
[tox]
envlist = py32, py33, py34
[testenv]
-# Change dir to avoid import problem
-changedir = {envdir}
+# Change dir to avoid import problem for cython code. The directory does
+# not really matter, should be just different from the toplevel dir.
+changedir = {toxworkdir}
deps =
pytest
mock
-commands = py.test
-passenv = * # fakeroot -u needs some env vars
+commands = py.test --pyargs {posargs:borg.testsuite}
+# fakeroot -u needs some env vars:
+passenv = *