From: Daniele Varrazzo Date: Fri, 6 Oct 2023 19:37:17 +0000 (+0200) Subject: test: mark array leak test slow X-Git-Tag: pool-3.1.9~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147b23c936eb0934fa825df6d2bd261fca590944;p=thirdparty%2Fpsycopg.git test: mark array leak test slow It takes 300ms, but it's still a blip when other tests run. Add notes in the tests readme about repeating finding slow tests. --- diff --git a/tests/README.rst b/tests/README.rst index 63c72382a..4bd3a0001 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -55,6 +55,12 @@ Test options [...] ==== 1877 passed, 2 skipped, 169 deselected, 48 xfailed in 13.47s ===== + .. note:: + In order to spot new slow tests you can run:: + + pytest -m "not slow" --durations-min=0.1 --durations=0 + + - ``pytest`` option ``--pq-trace={TRACEFILE,STDERR}`` can be used to capture libpq trace. When using ``stderr``, the output will only be shown for failing or in-error tests, unless ``-s/--capture=no`` option is used. diff --git a/tests/types/test_array.py b/tests/types/test_array.py index 1f8c0f0de..8100bc7a8 100644 --- a/tests/types/test_array.py +++ b/tests/types/test_array.py @@ -341,6 +341,7 @@ def test_all_chars_with_bounds(conn, fmt_out): assert cur.fetchone()[0] == ["a", "b", s] +@pytest.mark.slow def test_register_array_leak(conn): info = TypeInfo.fetch(conn, "date") ntypes = []