diff --git a/tox.ini b/tox.ini
index 0e9664c377366923b60e11d138825e1543cc8c7f..3772a7367de665cfe653291eeabe39fbb14ecd8b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,11 @@ deps=nose
     openpyxl >= 3.0.7
     xlrd == 1.2
     h5py
-commands=py.test --cov=caosadvancedtools -vv {posargs}
+commands_pre=pip install ../caosdb-pylib/
+    python --version
+    python -c "import caosdb; print(caosdb.__version__)"
+# Add "-x" to stop at first error.
+commands=pytest --cov=caosadvancedtools -vv {posargs}
 
 [flake8]
 max-line-length=100