]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Mark slow every test taking more than 0.1s to run
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Oct 2021 23:08:12 +0000 (01:08 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Oct 2021 23:08:12 +0000 (01:08 +0200)
tests/pq/test_pgconn.py
tests/test_adapt.py
tests/test_connection.py
tests/test_connection_async.py
tests/test_cursor.py
tests/test_cursor_async.py
tests/test_errors.py
tests/types/test_net.py
tests/types/test_uuid.py

index e846adf2edfcaaf75fb9105bcc1c3d57d2e6432a..4f213fef524b62c273ef4e6905ee137f0c5016aa 100644 (file)
@@ -81,6 +81,7 @@ def test_finish(pgconn):
     assert pgconn.status == pq.ConnStatus.BAD
 
 
+@pytest.mark.slow
 def test_weakref(dsn):
     conn = pq.PGconn.connect(dsn.encode())
     w = weakref.ref(conn)
index 09edfceaf538d399e92bb02ffa621ba855e73c0c..fa9b5e8f5401b3d6ed8075c4c58d32742307157c 100644 (file)
@@ -382,6 +382,7 @@ def test_no_cast_needed(conn, fmt_in):
     assert cur.fetchone()[0] == 20
 
 
+@pytest.mark.slow
 @pytest.mark.skipif(_psycopg is None, reason="C module test")
 def test_optimised_adapters():
 
index 7faae5dd4a4cc7fe6a910a6557a7cc793104603c..fb5f80a64a3810d7df5a92413fd6b6ea033059f9 100644 (file)
@@ -177,6 +177,7 @@ def test_context_rollback_no_clobber(conn, dsn, caplog):
     assert "rolling back" in rec.message
 
 
+@pytest.mark.slow
 def test_weakref(dsn):
     conn = psycopg.connect(dsn)
     w = weakref.ref(conn)
index e0bb74c16c129a22a46a05a647ab37035362cefe..9513c442b4357db84eb0df3a08b7d7ff9dd84b80 100644 (file)
@@ -182,6 +182,7 @@ async def test_context_rollback_no_clobber(conn, dsn, caplog):
     assert "rolling back" in rec.message
 
 
+@pytest.mark.slow
 async def test_weakref(dsn):
     conn = await psycopg.AsyncConnection.connect(dsn)
     w = weakref.ref(conn)
index a72b617fec43d979d3e0cf07f85e25e649116dca..5a4a7b8ccf545a2b3d2ed8d89b84ef5599096270 100644 (file)
@@ -33,6 +33,7 @@ def test_context(conn):
     assert cur.closed
 
 
+@pytest.mark.slow
 def test_weakref(conn):
     cur = conn.cursor()
     w = weakref.ref(cur)
index 7f297ab5490c585ebb9a6e7cf2aef1738bb9ee8f..325285b875ca4e217968b7e7c8f3a9c347005bb7 100644 (file)
@@ -33,6 +33,7 @@ async def test_context(aconn):
     assert cur.closed
 
 
+@pytest.mark.slow
 async def test_weakref(aconn):
     cur = aconn.cursor()
     w = weakref.ref(cur)
index cd92f4d940c4bef6f1b368349652eb878f963d1b..b6065c601eab48ad87ed48ccfa4f5ba8c6a1c347 100644 (file)
@@ -165,6 +165,7 @@ def test_diag_pickle(conn):
     assert diag2.sqlstate == "42P01"
 
 
+@pytest.mark.slow
 def test_diag_survives_cursor(conn):
     cur = conn.cursor()
     with pytest.raises(e.Error) as exc:
index 9a465681e82dd1c9310d67ad790885882ae20cd8..ca98d1f17ef73c73b8ae3e6662f6857c929aba05 100644 (file)
@@ -133,6 +133,7 @@ def test_cidr_load(conn, fmt_out, val):
     assert got == pyval
 
 
+@pytest.mark.slow
 @pytest.mark.subprocess
 def test_lazy_load(dsn):
     script = f"""\
index 9ddc0bbbe530efbb36b936d6411113e700deb1e6..2a7aaf21c8c7901683350d8ef61a6db7a82aba3e 100644 (file)
@@ -34,6 +34,7 @@ def test_uuid_load(conn, fmt_out):
     assert res == UUID(val)
 
 
+@pytest.mark.slow
 @pytest.mark.subprocess
 def test_lazy_load(dsn):
     script = f"""\