Fix Zotero table models for Zotero 9:
- Remove stale Annotations/Highlights/Transaction* models
- Add ItemAnnotations, RetractedItems, DeletedCollections,
DeletedSearches, DbDebug1
- Fix ItemAttachments, Libraries, Users column mismatches
New test files covering all major modules:
- cli/{bib,prisma,rec,zot,mail,run} deep exercising tests
- mail/{droplet,postmark,resend,cloudflare} lifecycle tests
- bib/{iom,oig,pincite,sync,regulations_gov,email_ingest,format,store}
- prisma/{vpn,fetch,export,llm,screen,eligibility,extract,project,ingest,flow}
- aco/lake/{unity,quality,deploy} + api/aco coverage gaps
- zot/{ops,db,extract,duck} + rec/{report,engine,base,pricers}
- pfs/{pipe,rules,eq,files}
Add pytest-xdist for parallel test execution.
Tracks #353
26 lines
771 B
Python
26 lines
771 B
Python
"""Tests for rec.__main__ — module entry point.
|
|
|
|
Covers lines 3, 5, 7-8: import of cli.rec.app and __main__ guard.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import runpy
|
|
from unittest.mock import patch
|
|
|
|
|
|
class TestRecMain:
|
|
"""Lines 3, 5, 7-8: rec.__main__ imports and delegates to cli.rec.app."""
|
|
|
|
def test_import_module(self) -> None:
|
|
"""Importing rec.__main__ loads the cli.rec.app reference (lines 3, 5)."""
|
|
import rec.__main__ as m
|
|
|
|
assert hasattr(m, "app")
|
|
|
|
def test_run_module_invokes_app(self) -> None:
|
|
"""Running 'python -m rec' invokes app() (lines 7-8)."""
|
|
with patch("cli.rec.app") as mock_app:
|
|
runpy.run_module("rec", run_name="__main__", alter_sys=False)
|
|
mock_app.assert_called_once()
|