assert pgconn.status == pq.ConnStatus.BAD
+@pytest.mark.slow
def test_weakref(dsn):
conn = pq.PGconn.connect(dsn.encode())
w = weakref.ref(conn)
assert cur.fetchone()[0] == 20
+@pytest.mark.slow
@pytest.mark.skipif(_psycopg is None, reason="C module test")
def test_optimised_adapters():
assert "rolling back" in rec.message
+@pytest.mark.slow
def test_weakref(dsn):
conn = psycopg.connect(dsn)
w = weakref.ref(conn)
assert "rolling back" in rec.message
+@pytest.mark.slow
async def test_weakref(dsn):
conn = await psycopg.AsyncConnection.connect(dsn)
w = weakref.ref(conn)
assert cur.closed
+@pytest.mark.slow
def test_weakref(conn):
cur = conn.cursor()
w = weakref.ref(cur)
assert cur.closed
+@pytest.mark.slow
async def test_weakref(aconn):
cur = aconn.cursor()
w = weakref.ref(cur)
assert diag2.sqlstate == "42P01"
+@pytest.mark.slow
def test_diag_survives_cursor(conn):
cur = conn.cursor()
with pytest.raises(e.Error) as exc:
assert got == pyval
+@pytest.mark.slow
@pytest.mark.subprocess
def test_lazy_load(dsn):
script = f"""\
assert res == UUID(val)
+@pytest.mark.slow
@pytest.mark.subprocess
def test_lazy_load(dsn):
script = f"""\