Replace nose with pytest (see: #997758).

This commit is contained in:
Stefano Rivera 2021-10-24 15:57:27 -07:00
parent 9360b17bcb
commit a9e2a2689d
6 changed files with 15 additions and 8 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
ubuntu-dev-tools (0.186) UNRELEASED; urgency=medium
* Replace nose with pytest (see: #997758).
-- Stefano Rivera <stefanor@debian.org> Sun, 24 Oct 2021 15:57:04 -0700
ubuntu-dev-tools (0.185) unstable; urgency=medium ubuntu-dev-tools (0.185) unstable; urgency=medium
[ Alex Murray ] [ Alex Murray ]

2
debian/control vendored
View File

@ -22,7 +22,7 @@ Build-Depends:
python3-distro-info, python3-distro-info,
python3-httplib2, python3-httplib2,
python3-launchpadlib, python3-launchpadlib,
python3-nose, python3-pytest,
python3-requests <!nocheck>, python3-requests <!nocheck>,
python3-setuptools, python3-setuptools,
Standards-Version: 4.6.0 Standards-Version: 4.6.0

2
debian/rules vendored
View File

@ -8,7 +8,7 @@ override_dh_auto_clean:
override_dh_auto_test: override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
flake8 -v --max-line-length=99 flake8 -v --max-line-length=99
nosetests3 -v ubuntutools python3 -m pytest -v ubuntutools
endif endif
%: %:

View File

@ -3,10 +3,10 @@ Depends:
flake8, flake8,
Restrictions: allow-stderr Restrictions: allow-stderr
Test-Command: nosetests3 -v ubuntutools Test-Command: python3 -m pytest -v ubuntutools
Depends: Depends:
dh-make, dh-make,
python3-nose, python3-pytest,
python3-setuptools, python3-setuptools,
@, @,
Restrictions: allow-stderr Restrictions: allow-stderr

View File

@ -1,3 +1,4 @@
coverage coverage
flake8 >= 3.8.0 flake8 >= 3.8.0
nose pytest
pytest-cov

View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = flake8,nose envlist = flake8,pytest
skipsdist = True skipsdist = True
[testenv] [testenv]
@ -14,8 +14,8 @@ install_command = pip install {opts} {packages}
[testenv:flake8] [testenv:flake8]
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:nose] [testenv:pytest]
commands = nosetests -v --with-coverage --cover-package=ubuntutools {posargs:ubuntutools} commands = pytest -v --cov=ubuntutools {posargs:ubuntutools}
[flake8] [flake8]
verbose = 2 verbose = 2