From: Daniele Varrazzo Date: Thu, 28 Oct 2021 23:08:12 +0000 (+0200) Subject: Mark slow every test taking more than 0.1s to run X-Git-Tag: 3.0.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc647e92e038c7a7353c90da090ce21ab56d724d;p=thirdparty%2Fpsycopg.git Mark slow every test taking more than 0.1s to run --- diff --git a/tests/pq/test_pgconn.py b/tests/pq/test_pgconn.py index e846adf2e..4f213fef5 100644 --- a/tests/pq/test_pgconn.py +++ b/tests/pq/test_pgconn.py @@ -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) diff --git a/tests/test_adapt.py b/tests/test_adapt.py index 09edfceaf..fa9b5e8f5 100644 --- a/tests/test_adapt.py +++ b/tests/test_adapt.py @@ -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(): diff --git a/tests/test_connection.py b/tests/test_connection.py index 7faae5dd4..fb5f80a64 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -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) diff --git a/tests/test_connection_async.py b/tests/test_connection_async.py index e0bb74c16..9513c442b 100644 --- a/tests/test_connection_async.py +++ b/tests/test_connection_async.py @@ -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) diff --git a/tests/test_cursor.py b/tests/test_cursor.py index a72b617fe..5a4a7b8cc 100644 --- a/tests/test_cursor.py +++ b/tests/test_cursor.py @@ -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) diff --git a/tests/test_cursor_async.py b/tests/test_cursor_async.py index 7f297ab54..325285b87 100644 --- a/tests/test_cursor_async.py +++ b/tests/test_cursor_async.py @@ -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) diff --git a/tests/test_errors.py b/tests/test_errors.py index cd92f4d94..b6065c601 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -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: diff --git a/tests/types/test_net.py b/tests/types/test_net.py index 9a465681e..ca98d1f17 100644 --- a/tests/types/test_net.py +++ b/tests/types/test_net.py @@ -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"""\ diff --git a/tests/types/test_uuid.py b/tests/types/test_uuid.py index 9ddc0bbbe..2a7aaf21c 100644 --- a/tests/types/test_uuid.py +++ b/tests/types/test_uuid.py @@ -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"""\