Skip to content

Bug: Scheduler Function Tests Fail with Missing tzdata Dependency #258

@pankaj-bind

Description

@pankaj-bind

The scheduler function tests, specifically test_on_schedule_call and test_on_schedule_decorator in tests/test_scheduler_fn.py, are currently failing on environments where the tzdata package is not installed.

PS G:\firebase-functions-python> uv run pytest
.
.
=============================================== short test summary info ===============================================
FAILED tests/test_scheduler_fn.py::TestScheduler::test_on_schedule_call - zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key America/Los_Angeles'
FAILED tests/test_scheduler_fn.py::TestScheduler::test_on_schedule_decorator - zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key America/Los_Angeles'
====================================== 2 failed, 97 passed, 13 warnings in 1.65s ======================================
PS G:\firebase-functions-python>

Proposed Fix

Add tzdata as a required dependency to the [project].dependencies section in pyproject.toml to ensure the timezone functionality works reliably across all environments.

[project]
# ...
dependencies = [
  # ... existing dependencies
  "tzdata", # Add this line
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions