Skip to content

Make pgmq_all_variants fixture async driver aware#41

Merged
jason810496 merged 3 commits into
ci/add-ast-based-script-for-async-methodsfrom
copilot/sub-pr-36-one-more-time
Jan 6, 2026
Merged

Make pgmq_all_variants fixture async driver aware#41
jason810496 merged 3 commits into
ci/add-ast-based-script-for-async-methodsfrom
copilot/sub-pr-36-one-more-time

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 6, 2026

Description

The pgmq_all_variants fixture was parametrizing tests with both sync and async driver variants, causing failures when dependent fixtures (pgmq_setup_teardown, pgmq_partitioned_setup_teardown) called methods like create_queue() and drop_queue() without await on async PGMQ instances.

Changes

  • tests/conftest.py: Modified pytest_generate_tests to exclude async fixtures from pgmq_all_variants parametrization. Tests using this fixture now skip when --driver=asyncpg is specified.
  • tests/fixture_deps.py: Updated docstring to clarify pgmq_all_variants only provides sync driver variants. Async tests should use async fixtures directly (pgmq_by_async_dsn, pgmq_by_async_engine, pgmq_by_async_session_maker).

Behavior

  • No driver specified: Only sync fixtures used
  • Sync driver specified (--driver=psycopg2): Only sync fixtures used
  • Async driver specified (--driver=asyncpg): Tests using pgmq_all_variants are skipped

Async tests in test_operation.py already use async fixtures directly and are unaffected.

Status

  • In progress
  • Ready for review
  • Done

Checklist

  • Read the Contributing Guide
  • Passes tests
  • Linted ( we use pre-commit with ruff )
  • Updated documentation

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 6, 2026 06:46
…ync fixtures only

Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CST-based script to complete missing async methods Make pgmq_all_variants fixture async driver aware Jan 6, 2026
Copilot AI requested a review from jason810496 January 6, 2026 06:49
@jason810496 jason810496 marked this pull request as ready for review January 6, 2026 07:57
@jason810496 jason810496 merged commit 145ba4b into ci/add-ast-based-script-for-async-methods Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants