{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"}],"enrichment":{"capability":"pytest-freezer provides a pytest fixture that freezes system time during tests, allowing you to control the clock for reproducible time-dependent test scenarios.","skillfed_tags":["testing-fixture","time-mocking"],"use_cases":["Test code that checks expiration dates or time-based conditions without waiting for real time to elapse","Verify scheduled task or cron-like behavior by advancing the clock to specific dates and times","Ensure datetime-dependent calculations produce consistent results across test runs","Test retry logic or timeout behavior by controlling how much time passes between operations","Validate time-zone-aware datetime handling in isolation from the system clock"],"what_it_does":"pytest-freezer wraps freezegun as a pytest fixture, letting you freeze and manipulate system time within test functions. Instead of manually managing freezegun contexts, you inject the `freezer` fixture into your test and call methods like `move_to()` and `tick()` to advance or set the clock. Time is frozen by default when the fixture is active, so datetime calls return consistent values across a test\u2014useful for testing time-sensitive logic without waiting for real time to pass or dealing with flaky tests that depend on wall-clock timing.\n\nThe package depends on pytest and freezegun, both of which are widely used in the Python ecosystem. It requires Python 3.6 or later and is classified as a testing framework plugin. With low install friction and no known vulnerabilities, it is a straightforward addition to test suites that need deterministic time control.","worth_installing":"Yes. If your test suite includes time-dependent code, pytest-freezer eliminates the friction of managing freezegun contexts manually. The fixture interface is cleaner than raw freezegun, install friction is minimal, and the MIT license poses no restrictions. Maintenance is dormant but the package is stable and narrow in scope\u2014there is little that can break. Install it when you need time control in pytest tests."},"id":"pytest-freezer","links":{"html":"https://skillfed.io/packages/pytest-freezer","md":"https://skillfed.io/packages/pytest-freezer.md","pypi":"https://pypi.org/project/pytest-freezer/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-12-12","license_spdx":null,"license_treatment":"permissive","name":"pytest-freezer","python_support":"supports_current","summary":"Pytest plugin providing a fixture interface for spulec/freezegun"},"popularity":{"monthly_downloads":1383989,"position":3979,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.9"}
