From: Tomas Krizek Date: Mon, 4 Feb 2019 11:56:08 +0000 (+0100) Subject: tests/pytests: fix deprecation warning with latest pytest X-Git-Tag: v4.0.0~24^2~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d307b000f8538029b6f2442896fb8024fb17bb6d;p=thirdparty%2Fknot-resolver.git tests/pytests: fix deprecation warning with latest pytest --- diff --git a/tests/pytests/utils.py b/tests/pytests/utils.py index c9ad48c7a..46bd279e5 100644 --- a/tests/pytests/utils.py +++ b/tests/pytests/utils.py @@ -98,7 +98,7 @@ def ping_alive(sock, msgid=None): @contextmanager def expect_kresd_close(rst_ok=False): - with pytest.raises(BrokenPipeError, message="kresd didn't close the connection"): + with pytest.raises(BrokenPipeError): try: time.sleep(0.2) # give kresd time to close connection with TCP FIN yield @@ -107,6 +107,7 @@ def expect_kresd_close(rst_ok=False): raise BrokenPipeError else: pytest.skip("kresd closed connection with TCP RST") + pytest.fail("kresd didn't close the connection") def make_ssl_context(insecure=False, verify_location=None, extra_options=None):