]> git.ipfire.org Git - thirdparty/psycopg.git/commit
tests: fix allow to skip running the pool tests again
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 11 Apr 2024 23:15:34 +0000 (01:15 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 11 Apr 2024 23:15:34 +0000 (01:15 +0200)
commitba296f7bd194ec4e91f20b86bb3b71afdf728858
tree14f7c9362a7dfcae404cc41e825a4622fd1685c8
parent5eb3086c5e697a091ff46a50f2158a661687ddf6
tests: fix allow to skip running the pool tests again

`pytest -m not pool` should allow to skip the pool test. However,
because of the attribute access at import time to define the test
marker, import failed as well.

Convert the marker to strings which will be used in a getattr by the
fixture. Extend async-to-sync to convert the pool classes names from the
string too.
tests/pool/test_pool_common.py
tests/pool/test_pool_common_async.py
tools/async_to_sync.py