]> git.ipfire.org Git - thirdparty/psycopg.git/commit
tests: simplify PGcancelConn tests
authorDenis Laxalde <denis.laxalde@dalibo.com>
Fri, 5 Apr 2024 08:18:41 +0000 (10:18 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 5 Apr 2024 18:35:16 +0000 (18:35 +0000)
commit8af314fa9ed9496c6176300cc804e2b745085ff4
tree9c5778de9b13734fdf41beee76b349d30b755e59
parent9bbf50317bc4ffbed8918b2556c9f091ad4362d5
tests: simplify PGcancelConn tests

We split the previous (misnamed) test_cancel_nonblocking() into
test_cancel_conn_blocking() and test_cancel_conn_nonblocking()
respectively checking PQcancelBlocking() and
PQcancelStart()/PQcancelPoll().

The cancellable_query() is now responsible for creating the monitor_conn
and uses a PGconn value, coming from the pgconn fixture in tests.
tests/pq/test_pgconn.py