summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2022-07-11 08:27:18 -0600
committerGitHub <noreply@github.com>2022-07-11 08:27:18 -0600
commite496712d3e53c3e72910f20bdbbb4236542fc61b (patch)
tree1c6ce9345ca13c326f215be965097e2897cf9349 /tox.ini
parent9094a8f924e6edcfd1d5bcc3e7ec763861dbb288 (diff)
downloadcloud-init-git-e496712d3e53c3e72910f20bdbbb4236542fc61b.tar.gz
Enable pytest to run in parallel (#1568)
- add a tox target for running unit tests in parallel - add missing mocks - make parametrized gzip bytes deterministic
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini9
1 files changed, 9 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index 1743b5e6..495b8256 100644
--- a/tox.ini
+++ b/tox.ini
@@ -135,6 +135,14 @@ commands = {envpython} -m pytest \
-m "not hypothesis_slow" \
{posargs:--cov=cloudinit --cov-branch tests/unittests}
+# experimental
+[testenv:py3-fast]
+deps =
+ -r{toxinidir}/test-requirements.txt
+ pytest-xdist
+commands = {envpython} -m pytest -n auto -m "not hypothesis_slow" -m "not serial"\
+ {posargs:tests/unittests}
+
[testenv:hypothesis-slow]
deps =
hypothesis==6.31.6
@@ -300,6 +308,7 @@ markers =
not_bionic: test cannot run on the bionic release
oci: test will only run on OCI platform
openstack: test will only run on openstack platform
+ serial: tests that do not work in parallel, skipped with py3-fast
ubuntu: this test should run on Ubuntu
unstable: skip this test because it is flakey
user_data: the user data to be passed to the test instance