Skip to content

test: the sync test mirror no longer drops the test after a skipped class - #150

Merged
AlexeyShalaev merged 3 commits into
masterfrom
test/regenerate-sync-integration-mirror
Nov 23, 2026
Merged

AlexeyShalaev merged 3 commits into
masterfrom
test/regenerate-sync-integration-mirror

Conversation

@AlexeyShalaev

Copy link
Copy Markdown
Member

Summary

Regenerating tests/integration/sync/ from the aio suite dropped a real test. A # sync-mirror: skip marker above a class (_Writer in test_migration.py) sent _without_skipped into its decorator state, so it skipped the class and then the first test after it: test__partition_data__drains_default_into_monthly_partitions_in_batches. The committed sync file only still had it because it had been kept by hand, and CI does not compare the mirror.

  • class now counts as a definition after a skip marker.
  • test_cli.py is left out of the mirror on purpose (AIO_ONLY): the CLI runs the aio service on its own loop, so a sync twin would run the same code again, and the old generator's twin did not even import asyncio.
  • A section heading whose tests are all skipped is dropped with its comment, instead of being left over a section with nothing in it.
  • tests/unit/test_sync_tests_mirror.py pins all three. Each fails with its fix reverted.

Regenerating now changes one line of the sync suite, the ACCESS EXCLUSIVE on the parent assertion it had missed in test_lifecycle_policies.py, plus the empty headings in test_maintainer.py and test_safe_drop.py. CONTRIBUTING.md and .agents/project.md mention the test_cli.py exception.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring / internal

Checklist

  • Tests added or updated
  • make check passes locally (ruff + mypy)
  • CHANGELOG.md: not user-visible
  • Documentation updated: CONTRIBUTING.md

Tests run: pytest -m unit (2880 passed) and the regenerated sync integration modules test_lifecycle_policies, test_maintainer, test_safe_drop, test_migration on PostgreSQL 17 (79 passed).

Related issues

Found while reviewing #149.

AI Review

Commit 47d0a5b, Claude Opus 5.5, fixes after it not reviewed again

  • Correctness - no findings
  • Security - not applicable: development script over the repository's own test files, no outside input, secret or dependency
  • Performance - not applicable: a script run by hand over 18 test modules
  • Design & Style - 1 fixed
  • Tests - 1 fixed
  • Compatibility - 1 fixed

…lass

A skip marker above a class sent _without_skipped into its decorator state, so it skipped the class and then the first test after it as well: regenerating lost test__partition_data__drains_default_into_monthly_partitions_in_batches from the sync suite. test_cli.py is left out of the mirror (the CLI runs the aio service on its own loop), and a section whose tests are all skipped loses its heading. Regenerating now brings in only the one assertion the sync suite had missed.
@codecov

codecov Bot commented Nov 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlexeyShalaev
AlexeyShalaev merged commit e1723b0 into master Nov 23, 2026
33 checks passed
@AlexeyShalaev
AlexeyShalaev deleted the test/regenerate-sync-integration-mirror branch November 23, 2026 06:19
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.

1 participant