awesome-repositories.com
Blog
MCP
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
spulec avatar

spulec/freezegun

0
View on GitHub↗
4,517 Stars·296 Forks·Python·Apache-2.0·6 Aufrufe

Freezegun

Freezegun ist eine Python-Time-Mocking-Bibliothek und ein System-Clock-Emulator, der dazu verwendet wird, die Systemuhr auf ein festes Datum und eine feste Uhrzeit einzufrieren. Sie dient als Test-Utility, um sicherzustellen, dass zeitabhängige Logik während der Softwareverifizierung konsistente und vorhersagbare Ergebnisse liefert.

Die Bibliothek bietet einen Asyncio-kompatiblen Mock, der reale monotone Uhrwerte bewahrt, um zu verhindern, dass Event-Loops hängen bleiben, während andere Systemzeitfunktionen eingefroren bleiben. Sie unterstützt die Simulation des Zeitverlaufs durch manuelles Vorrücken der Uhr, Springen zu bestimmten Daten oder die Verwendung einer tickenden Uhr-Simulation, die die Zeit automatisch zwischen Aufrufen inkrementiert.

Das Tool enthält eine Mocking-Ausschlussliste, um zu verhindern, dass spezifische Bibliotheken abgefangen werden, wodurch sichergestellt wird, dass interne Abhängigkeiten und Drittanbieter-Integrationen stabil bleiben.

Features

  • Time Mocking Libraries - Acts as a specialized Python library for freezing the system clock to ensure consistent test results.
  • Asyncio Monotonic Clock Preservation - Maintains the real monotonic clock for asyncio event loops while keeping other system time functions frozen.
  • Deterministic Testing Clocks - Provides deterministic testing by decoupling time measurement from the actual system clock.
  • Monotonic Time Measurement - Preserves the real monotonic clock to ensure asyncio event loops remain functional while the wall-clock is frozen.
  • Clock Overrides - Replaces the internal system clock with a custom, predictable time source.
  • Asyncio Timing Simulation - Controls the system clock while maintaining the real monotonic clock to prevent asyncio event loops from stalling.
  • Clock Freezing - Mocks the system clock to return a fixed date and time to ensure consistent, deterministic test outcomes.
  • System Clock Mocks - Intercepts system-level clock calls to return predefined, frozen timestamps for testing.
  • Time Simulation Utilities - Provides utility functions to intercept and control native timing for synchronous testing of asynchronous code.
  • Manual Time Advancement - Freezegun enables moving the frozen clock forward by a specific increment or jumping to a designated date and time during test execution.
  • Mocking Exclusions - Freezegun prevents specific libraries from having their time functions intercepted to avoid breaking internal dependencies and third-party integrations.
  • Standard Library Monkey Patching - Overrides standard library time functions at runtime to replace them with mocked implementations.
  • Dynamic Function Interception - Intercepts calls to the datetime and time modules to route them to a central mocked state.
  • Ticking Clock Simulations - Simulates the continuous passage of time by automatically incrementing the mocked clock between calls.
  • Mocking and Fixtures - Mocks the datetime module for time-based testing.
  • Mocking Libraries - Time-travel testing by mocking date modules.
  • Test-Frameworks - Mocks the system clock to test time-dependent logic.
  • Testing Tools - Listed in the “Testing Tools” section of the Awesome Python awesome list.

Star-Verlauf

Star-Verlauf für spulec/freezegunStar-Verlauf für spulec/freezegun

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Freezegun

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Freezegun.
  • getsentry/responsesAvatar von getsentry

    getsentry/responses

    4,350Auf GitHub ansehen↗

    Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to return predefined simulated responses. It functions as a request verification framework and a network simulation tool, allowing for the verification of application behavior against various API response patterns without making real network calls. The project distinguishes itself through a traffic recorder that captures real network interactions and saves them to files for deterministic replay. It further enables the simulation of complex network scenarios, including the triggering

    Pythontag-production
    Auf GitHub ansehen↗4,350
  • jodaorg/joda-timeAvatar von JodaOrg

    JodaOrg/joda-time

    4,984Auf GitHub ansehen↗

    Joda-Time is a Java date and time library and framework used for parsing, representing, and calculating temporal data. It provides a thread-safe temporal API that uses immutable objects to ensure concurrency safety and adheres to the ISO8601 standard. The project is distinguished by its pluggable calendar system, which supports diverse chronologies including Gregorian, Buddhist, Coptic, Ethiopic, and Islamic calendars. It also functions as a time zone management tool, utilizing an internal IANA-based zone database to translate instants and update daylight savings rules independently of the ho

    Javadate-timejavajoda
    Auf GitHub ansehen↗4,984
  • dromara/carbonAvatar von dromara

    dromara/carbon

    5,221Auf GitHub ansehen↗

    Carbon is a Go library for semantic date and time calculations, formatting, and parsing. It provides a semantic interface to simplify temporal data handling and improve the readability of date and time manipulations. The library is distinguished by its support for multi-calendar date conversion, allowing transformations between Gregorian, Chinese Lunar, Persian, and Hebrew calendar systems. It also includes a localized temporal framework that uses ISO 639-1 codes to format dates and relative time differences across multiple language locales. Additional capabilities cover global time zone man

    Go
    Auf GitHub ansehen↗5,221
  • kevin1024/vcrpyAvatar von kevin1024

    kevin1024/vcrpy

    2,969Auf GitHub ansehen↗

    Automatically mock your HTTP interactions to simplify and speed up testing

    Pythonhttpmockingpython
    Auf GitHub ansehen↗2,969
Alle 30 Alternativen zu Freezegun anzeigen→

Häufig gestellte Fragen

Was macht spulec/freezegun?

Freezegun ist eine Python-Time-Mocking-Bibliothek und ein System-Clock-Emulator, der dazu verwendet wird, die Systemuhr auf ein festes Datum und eine feste Uhrzeit einzufrieren. Sie dient als Test-Utility, um sicherzustellen, dass zeitabhängige Logik während der Softwareverifizierung konsistente und vorhersagbare Ergebnisse liefert.

Was sind die Hauptfunktionen von spulec/freezegun?

Die Hauptfunktionen von spulec/freezegun sind: Time Mocking Libraries, Asyncio Monotonic Clock Preservation, Deterministic Testing Clocks, Monotonic Time Measurement, Clock Overrides, Asyncio Timing Simulation, Clock Freezing, System Clock Mocks.

Welche Open-Source-Alternativen gibt es zu spulec/freezegun?

Open-Source-Alternativen zu spulec/freezegun sind unter anderem: getsentry/responses — Responses is a Python mocking library designed to intercept outgoing HTTP calls made with the Requests library to… jodaorg/joda-time — Joda-Time is a Java date and time library and framework used for parsing, representing, and calculating temporal data.… dromara/carbon — Carbon is a Go library for semantic date and time calculations, formatting, and parsing. It provides a semantic… kevin1024/vcrpy — Automatically mock your HTTP interactions to simplify and speed up testing. lk-geimfari/mimesis — Mimesis is a Python synthetic data generator used to create realistic fake datasets and mock data for software testing… mindflayer/python-mocket — a socket mock framework - for all kinds of socket animals, web-clients included.