Skip to content

Add unit tests for analytics_db and pincopy - #1

Merged
vijaxx merged 1 commit into
mainfrom
add-unit-tests
Jul 10, 2026
Merged

Add unit tests for analytics_db and pincopy#1
vijaxx merged 1 commit into
mainfrom
add-unit-tests

Conversation

@vijaxx

@vijaxx vijaxx commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Adds pytest coverage for two pure/self-contained pieces:

  • tests/test_analytics_db.py -- schema creation is idempotent, and the UNIQUE(theme, idx) constraint on pins actually rejects duplicates.
  • tests/test_pincopy.py -- extract_json correctly pulls a JSON array out of surrounding prose (or returns None on garbage), and the template fallback() always returns 5 variants with titles under Pinterest's 100-char limit.

Also wires pytest into CI via a new requirements-dev.txt and a test step in the workflow.

@vijaxx
vijaxx merged commit 8f49a38 into main Jul 10, 2026
1 check passed
@vijaxx
vijaxx deleted the add-unit-tests branch July 10, 2026 21:40
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