From 661cf409f2a940e9fa686d13a2de361a625d3fc1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 13 Jun 2023 15:40:08 +0200 Subject: [PATCH] rec: Upgrade regression tests to use pytest instead of nose One mysterious failure on Debian bookworm spotted: test_EDNS.py does not seem to set the right edns version on the outgoing query. To be investigated. --- regression-tests.recursor-dnssec/printlogs.py | 2 +- regression-tests.recursor-dnssec/requirements.txt | 2 +- regression-tests.recursor-dnssec/runtests | 4 ++-- regression-tests.recursor-dnssec/test_RecDnstap.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/regression-tests.recursor-dnssec/printlogs.py b/regression-tests.recursor-dnssec/printlogs.py index c4dde38d92..2c9065f735 100755 --- a/regression-tests.recursor-dnssec/printlogs.py +++ b/regression-tests.recursor-dnssec/printlogs.py @@ -5,7 +5,7 @@ import xml.etree.ElementTree import os.path import glob -e = xml.etree.ElementTree.parse('nosetests.xml') +e = xml.etree.ElementTree.parse('pysetest.xml') root = e.getroot() for child in root: diff --git a/regression-tests.recursor-dnssec/requirements.txt b/regression-tests.recursor-dnssec/requirements.txt index 3c15fe9ada..1ec32b533f 100644 --- a/regression-tests.recursor-dnssec/requirements.txt +++ b/regression-tests.recursor-dnssec/requirements.txt @@ -1,5 +1,5 @@ dnspython>=1.11 -nose>=1.3.7 +pytest protobuf>=2.5; sys_platform != 'darwin' protobuf>=3.0; sys_platform == 'darwin' pyasn1==0.4.8 diff --git a/regression-tests.recursor-dnssec/runtests b/regression-tests.recursor-dnssec/runtests index 6741a638cf..12b6946e7e 100755 --- a/regression-tests.recursor-dnssec/runtests +++ b/regression-tests.recursor-dnssec/runtests @@ -59,7 +59,7 @@ fi # LIBFAKETIME is only added to LD_PRELOAD by the pyton code when needed if [ "${LIBASAN}" != "" -o "${LIBAUTHBIND}" != "" ]; then -LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND}" nosetests -I test_WellKnown.py --with-xunit $@ +LD_PRELOAD="${LIBASAN} ${LIBAUTHBIND}" pytest --ignore=test_WellKnown.py --junitxml=pytest.xml $@ else -nosetests -I test_WellKnown.py --with-xunit $@ +pytest --ignore=test_WellKnown.py --junitxml=pytest.xml $@ fi diff --git a/regression-tests.recursor-dnssec/test_RecDnstap.py b/regression-tests.recursor-dnssec/test_RecDnstap.py index 38dcd715d4..2cde8ee086 100644 --- a/regression-tests.recursor-dnssec/test_RecDnstap.py +++ b/regression-tests.recursor-dnssec/test_RecDnstap.py @@ -5,7 +5,7 @@ import sys import threading import dns import dnstap_pb2 -from nose import SkipTest +from unittest import SkipTest from recursortests import RecursorTest FSTRM_CONTROL_ACCEPT = 0x01 -- 2.47.2