Tox can test against multiple versions of Python using
virtualenvs.
# The file containing the git revision.
/suricata/update/revision.py*
+
+# Working files for the tox testing framework.
+/.tox
python setup.py install
test:
- @if which nosetests-3 2>&1 > /dev/null; then \
- echo "Running nosetests-3."; \
- nosetests-3; \
+ @if ! which tox 2>&1 > /dev/null; then \
+ echo "error: tox required to run tests"; \
+ exit 1; \
fi
- @if which nosetests-2 2>&1 > /dev/null; then \
- echo "Running nosetests-2."; \
- nosetests-2; \
- fi
- @echo "Running nosetests."
- @nosetests
+ @tox
clean:
find . -name \*.pyc -print0 | xargs -0 rm -f
--- /dev/null
+# Tox (https://tox.readthedocs.io/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py27, py34, py35, py36
+
+[testenv]
+commands = pytest
+deps =
+ pytest
+ pyyaml