]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: drop ipaddress lazy load test
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 01:07:29 +0000 (02:07 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 3 Jul 2022 01:08:16 +0000 (02:08 +0100)
The module is now used by psycopg.

tests/types/test_net.py

index 41104e99f0456e2378fbcebf6f5b2e1632bcaed8..c1b29d7f98e68e2c473d643e548de41f8219fb8b 100644 (file)
@@ -1,6 +1,4 @@
-import sys
 import ipaddress
-import subprocess as sp
 
 import pytest
 
@@ -128,24 +126,3 @@ def test_cidr_load(conn, fmt_out, val):
         (got,) = copy.read_row()
 
     assert got == pyval
-
-
-@pytest.mark.slow
-@pytest.mark.subprocess
-def test_lazy_load(dsn):
-    script = f"""\
-import sys
-import psycopg
-
-assert 'ipaddress' not in sys.modules
-
-conn = psycopg.connect({dsn!r})
-with conn.cursor() as cur:
-    cur.execute("select '127.0.0.1'::inet")
-    cur.fetchone()
-
-conn.close()
-assert 'ipaddress' in sys.modules
-"""
-
-    sp.check_call([sys.executable, "-s", "-c", script])