]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: mark array leak test slow
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 6 Oct 2023 19:37:17 +0000 (21:37 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 6 Oct 2023 19:42:01 +0000 (21:42 +0200)
It takes 300ms, but it's still a blip when other tests run.

Add notes in the tests readme about repeating finding slow tests.

tests/README.rst
tests/types/test_array.py

index b99be83222b50365af36607c5b437c7f8837788a..c1f5d56af025ca983c6d507d8ddb07c22eec9ec6 100644 (file)
@@ -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.
index f9fb85ccb8d6e8dd6d1737fb1cfd4e3538a4f402..5f84c5a192828e8fc5850ad9830981bee860b2fa 100644 (file)
@@ -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 = []