Travel through time in your tests

Edit Package python-time-machine
https://github.com/adamchainz/time-machine

This library mocks all functions from Python's standard library that return the current date or datetime.
It can be used independently, as a function decorator, or as a context manager.

Refresh
Refresh
Source Files
Filename Size Changed
python-time-machine-2.13.0.tar.gz 0000028747 28.1 KB
python-time-machine.changes 0000005245 5.12 KB
python-time-machine.spec 0000002323 2.27 KB
Revision 14 (latest revision is 16)
Ana Guerrero's avatar Ana Guerrero (anag+factory) accepted request 1124381 from Matej Cepl's avatar Matej Cepl (mcepl) (revision 14)
Forwarded request #1124365 from ecsos

- Update to 2.13.0
    - Add support for datetime.timedelta to time_machine.travel().
    - Fix documentation about using local time for naive date(time) strings.
    - Add shift() method to the time_machine pytest fixture.
    - Mock time.monotonic() and time.monotonic_ns(). 
      They return the values of time.time() and time.time_ns()
      respectively, rather than real monotonic clocks.
  - Changes from 2.12.0
    - Include wheels for Python 3.12.
  - Changes from 2.11.0
    - Drop Python 3.7 support.
  - Changes from 2.10.0
    - Support Python 3.12.
Comments 0
openSUSE Build Service is sponsored by