Ross ROSS = Recommend OSS · open-source software intelligence for agents

spulec/freezegun

Let your Python tests travel through time observed · 2026-08-28

github.com/spulec/freezegun · Python · Apache-2.0 (permissive) observed · 2026-08-28

Health v2 · maintenance only

51/100

  • Activity 37
  • Release rhythm 42
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 17
  • age_days: 5013
  • days_rel: 389
  • days_push: 379
  • n_releases_24m: 4

Full methodology

Adoption not part of the score

4525 stars · 301 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

FreezeGun is a Python library that lets tests 'travel through time' by mocking datetime and time module functions. It provides a decorator and context manager to freeze the clock at a fixed moment during test execution.

Use cases

  • test code that depends on the current date or time
  • freeze datetime.now() in pytest tests
  • mock time.time() for deterministic unit tests
  • simulate deadlines and expiry logic in tests
  • test time-based scheduling behavior deterministically

When to choose

  • your Python tests need deterministic control over datetime or time functions
  • you use pytest or unittest and want a decorator/context-manager API
  • you need to test expiry, scheduling, or date-dependent logic

When to avoid

  • you need to mock time in non-Python languages
  • you need full control over monotonic clock semantics beyond what freezegun guarantees
  • your code uses time sources freezegun does not patch

Facets

library · maturity stable

testing mocking date-time testing developer-tools python cross-platform time-mocking pytest unittest datetime

2 sources

Member repositories

RepositoryRoleHealth v2
spulec/freezegunmain51

For agents

markdown · JSON · MCP: product_card(name="spulec/freezegun")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem