]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Clear the caplog in retried tests
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 23 Jul 2021 21:32:37 +0000 (23:32 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 23 Jul 2021 21:50:16 +0000 (23:50 +0200)
tests/pool/test_pool.py
tests/pool/test_pool_async.py

index e8727a343ac7273de13b06fbaa6cfbe72aa36855..15036aede772671a6524f73144c8e86e9bbebdd1 100644 (file)
@@ -709,6 +709,7 @@ def test_reconnect(proxy, caplog, monkeypatch, retries):
 
     for retry in retries:
         with retry:
+            caplog.clear()
             proxy.start()
             with pool.ConnectionPool(proxy.client_dsn, min_size=1) as p:
                 p.wait(2.0)
index 37a6733d7d38cbbabc4529584bf96ec2ed51c3a9..139a8fd768dfbae44787c4574e3c5bbf1b37efb7 100644 (file)
@@ -721,6 +721,7 @@ async def test_reconnect(proxy, caplog, monkeypatch, retries):
 
     async for retry in retries:
         with retry:
+            caplog.clear()
             proxy.start()
             async with pool.AsyncConnectionPool(
                 proxy.client_dsn, min_size=1