aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--requirements.txt1
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini27
-rw-r--r--upper-constraints.txt4
4 files changed, 17 insertions, 19 deletions
diff --git a/requirements.txt b/requirements.txt
index cb74132e2..23fc58e52 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -19,3 +19,4 @@ ruamel.yaml.jinja2 # MIT
tempest # Apache-2.0
rally
rally-openstack
+munch # MIT
diff --git a/test-requirements.txt b/test-requirements.txt
index e3cf977e8..a552f60f2 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -3,7 +3,9 @@
# process, which may cause wedges in the gate later.
coverage!=4.4 # Apache-2.0
mock!=4.0.0,!=4.0.1 # BSD
-nose # LGPL
+pytest # MIT
+pytest-html #MPL-2.0
+pytest-cov
flake8 # MIT
pylint # GPLv2
sphinx!=1.6.6,!=1.6.7,!=2.1.0,!=3.0.0,!=3.4.2 # BSD
diff --git a/tox.ini b/tox.ini
index 570d29c07..6ae0e3c43 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,13 +10,12 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
-commands = nosetests --with-xunit \
- --with-coverage \
- --cover-tests \
- --cover-package=functest \
- --cover-xml \
- --cover-html \
- functest/tests/unit
+commands =
+ pytest \
+ --junit-xml=junit.xml \
+ --html=report.html --self-contained-html \
+ --cov=xtesting --cov-reset --cov-report html \
+ functest/tests/unit
[testenv:docs]
basepython = python3.10
@@ -41,6 +40,7 @@ basepython = python3.10
commands =
pylint \
--ignore-imports=y --min-similarity-lines=15 \
+ --generated-members=os.* \
--disable=locally-disabled functest
[testenv:yamllint]
@@ -57,9 +57,6 @@ files =
commands =
yamllint -s {[testenv:yamllint]files}
-[testenv:py37]
-commands = nosetests functest/tests/unit
-
[testenv:bashate]
basepython = python3.10
files =
@@ -71,7 +68,6 @@ files =
build.sh
commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files}
-
[testenv:bandit]
basepython = python3.10
commands = bandit -r functest -x tests -n 5 -ll -s B601,B602
@@ -82,12 +78,9 @@ dirs =
functest/tests/unit/odl
functest/tests/unit/openstack/vping
functest/tests/unit/openstack/cinder
-commands = nosetests --with-coverage --cover-tests \
- --cover-package functest.opnfv_tests.sdn.odl \
- --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
- --cover-package functest.opnfv_tests.openstack.cinder.cinder_test \
- --cover-package functest.tests.unit \
- --cover-min-percentage 100 {[testenv:cover]dirs}
+commands =
+ pytest --cov=xtesting --cov-reset --cov-report html --cov-fail-under=100 \
+ {[testenv:cover]dirs}
[testenv:perm]
basepython = python3.10
diff --git a/upper-constraints.txt b/upper-constraints.txt
index 3df877ff5..ef6679936 100644
--- a/upper-constraints.txt
+++ b/upper-constraints.txt
@@ -14,7 +14,9 @@ git+https://opendev.org/openstack/rally-openstack.git@b8591ec366293d60735536f95f
git+https://github.com/xrally/xrally-kubernetes.git@2ffa85af2bff3438b6b23034b6ec6ee1de481090#egg=xrally-kubernetes
pylint===2.11.1
flake8===4.0.1
-nose===1.3.7
+pytest===7.1.2
+pytest-cov===3.0.0
+pytest-html===3.1.1
ruamel.yaml===0.17.17
sphinxcontrib-spelling===4.3.0
ansible-lint===5.2.1