Skip to content

[Bug] No automated tests cover region detection, dedup, or date parsing #56

Description

@Infrasity-Labs

Bug Description

There's no tests/ directory or test runner anywhere in the repo, despite fetchers/config.py (determine_region, deduplicate_events, parse_date) and checks/parse_readme.py (parse_date, parse_readme) containing exactly the kind of fiddly string logic that regresses silently, as shown by the substring-dedup and escaped-pipe bugs already filed against this repo.

Link to the Conference (if applicable)

Not applicable, this is about test coverage for the shared parsing and classification logic, not a specific listing.

Expected Behavior

The core logic used to classify and dedupe events should have test coverage so a regression gets caught before it reaches main.

Additional Context

Suggested fix: add a tests/ directory with pytest covering:

  • determine_region(): a handful of city and country strings per continent, plus the "unknown location gets rescued from name or link" path for virtual events.
  • deduplicate_events(): same series in a different city should not be treated as a duplicate; the same event with a slightly reworded name but the same date and location should be.
  • parse_readme.parse_date(): both ISO dates and month-name formats.

Where to look: fetchers/config.py, checks/parse_readme.py.

Acceptance criteria:

  • tests/test_config.py and tests/test_parse_readme.py exist and pass with pytest.
  • All three behaviors above are covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions