Skip to content

Add tests for classifier.classify() and classifier.classify_pending_filings() #27

Description

@AshayK003

Untested functions

classify() (diffiq/classifier.py:30)

Classifies a single filing by type (annual, quarterly, etc.) based on keywords in the title. Needs tests for:

  • Annual filing title -> "annual"
  • Quarterly filing title -> "quarterly"
  • Mixed signals -> correct priority
  • Empty title -> default classification
  • Non-English keywords

classify_pending_filings() (diffiq/classifier.py:52)

Batch classifies all pending filings in the database. Needs tests for:

  • Multiple pending filings -> all classified
  • No pending filings -> no-op
  • Database error -> graceful handling

How to run

python -m pytest tests/test_classifier.py -v

Difficulty

Easy. Pure logic, no external dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstestsTest coverage improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions