summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2022-07-26 15:07:35 -0700
committerTim Burke <tim.burke@gmail.com>2022-12-09 11:38:02 -0800
commitef155bd74aaf4ffce11956b2e5bd921dfb5d8809 (patch)
tree62ff11db3b04201a831e20a94f31ac0ce578c8b4 /tox.ini
parent745dfec35e50fb4e3fe5d16da431215bf88a835c (diff)
downloadswift-ef155bd74aaf4ffce11956b2e5bd921dfb5d8809.tar.gz
Switch to pytest
nose has not seen active development for many years now. With py310, we can no longer use it due to import errors. Also update lower contraints Closes-Bug: #1993531 Change-Id: I215ba0d4654c9c637c3b97953d8659ac80892db8
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini14
1 files changed, 5 insertions, 9 deletions
diff --git a/tox.ini b/tox.ini
index 3b7e5f30b..e1a6074af 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,13 +3,13 @@ envlist = py37,py27,pep8
minversion = 2.3.2
skipsdist = True
+[pytest]
+addopts = --verbose --cov=swift --cov-branch --cov-report=html:cover --cov-report term
+
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_COVERAGE=1
- NOSE_COVER_BRANCHES=1
- NOSE_COVER_HTML_DIR={toxinidir}/cover
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
@@ -17,7 +17,7 @@ deps =
commands =
find {envdir} ( -type f -o -type l ) -name "*.py[co]" -delete
find {envdir} -type d -name "__pycache__" -delete
- bash -ec "nosetests {posargs:test/unit} --with-id || nosetests --failed"
+ bash -ec "pytest {posargs:test/unit} || pytest --last-failed {posargs:test/unit}"
allowlist_externals =
bash
find
@@ -27,7 +27,7 @@ passenv = SWIFT_* *_proxy
usedevelop = False
deps = {[testenv:py36]deps}
commands =
- nosetests {posargs:test/s3api}
+ pytest {posargs:test/s3api}
passenv = SWIFT_* *_proxy
[testenv:py27]
@@ -47,10 +47,6 @@ deps = {[testenv:py36]deps}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
- NOSE_WITH_COVERAGE=1
- NOSE_COVER_BRANCHES=1
- NOSE_COVER_HTML=1
- NOSE_COVER_HTML_DIR={toxinidir}/cover
[testenv:pep8]
commands =