From: Denis Laxalde Date: Thu, 4 Nov 2021 15:04:38 +0000 (+0100) Subject: Do not catch TypeError in test_resolve_hostaddr_async_bad() X-Git-Tag: 3.0.3~3^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cd8a30028f3f49ebf5167f2c67644a413bef3b6;p=thirdparty%2Fpsycopg.git Do not catch TypeError in test_resolve_hostaddr_async_bad() It appears that only psycopg.OperationalError is actually raised. --- diff --git a/tests/test_dns.py b/tests/test_dns.py index 59affcbcb..480aec193 100644 --- a/tests/test_dns.py +++ b/tests/test_dns.py @@ -119,7 +119,7 @@ async def test_resolve_hostaddr_async_bad( for k, v in env.items(): monkeypatch.setenv(k, v) params = conninfo_to_dict(conninfo) - with pytest.raises((TypeError, psycopg.Error)): + with pytest.raises(psycopg.Error): await psycopg._dns.resolve_hostaddr_async( # type: ignore[attr-defined] params )