From: Daniele Varrazzo Date: Thu, 22 Dec 2022 22:48:44 +0000 (+0000) Subject: test(crdb): skip inet tests on v22.2.1 X-Git-Tag: 3.1.8~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be9d8818c1743c5bc3d6ca82f3328b4b0fc8a21c;p=thirdparty%2Fpsycopg.git test(crdb): skip inet tests on v22.2.1 Work around https://github.com/cockroachdb/cockroach/issues/94192 --- diff --git a/tests/fix_crdb.py b/tests/fix_crdb.py index 88ab50419..ad85698e3 100644 --- a/tests/fix_crdb.py +++ b/tests/fix_crdb.py @@ -106,6 +106,7 @@ _crdb_reasons = { "encoding": 35882, "geometric types": 21286, "hstore": 41284, + "inet": 94192, "infinity date": 41564, "interval style": 35807, "json array": 23468, @@ -125,6 +126,7 @@ _crdb_reasons = { _crdb_reason_version = { "backend pid": "skip < 22", + "inet": "skip == 22.2.1", "cancel": "skip < 22", "server-side cursor": "skip < 22.1.3", "severity_nonlocalized": "skip < 22.1.3", diff --git a/tests/types/test_net.py b/tests/types/test_net.py index 8739398f3..d5fe346d5 100644 --- a/tests/types/test_net.py +++ b/tests/types/test_net.py @@ -6,9 +6,11 @@ from psycopg import pq from psycopg import sql from psycopg.adapt import PyFormat +crdb_skip_inet = pytest.mark.crdb_skip("inet") crdb_skip_cidr = pytest.mark.crdb_skip("cidr") +@crdb_skip_inet @pytest.mark.parametrize("fmt_in", PyFormat) @pytest.mark.parametrize("val", ["192.168.0.1", "2001:db8::"]) def test_address_dump(conn, fmt_in, val): @@ -22,6 +24,7 @@ def test_address_dump(conn, fmt_in, val): assert cur.fetchone()[0] is True +@crdb_skip_inet @pytest.mark.parametrize("fmt_in", PyFormat) @pytest.mark.parametrize("val", ["127.0.0.1/24", "::ffff:102:300/128"]) def test_interface_dump(conn, fmt_in, val):