devel/py-time-machine 2.13.0_1 MidnightBSD
Travel through time in your Python tests
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- License
- mit
- Categories
- devel, python
Description
time-machine is intended to combine the advantages of freezegun and libfaketime Python modules. It works without LD_PRELOAD but still mocks the standard library functions everywhere they may be referenced. It does so by modifying the built-in functions at the C level, to point them through wrappers that return different values when mocking. Normally in Python, built-in functions are immutable, but time-machine overcomes this by using C code to replace their function pointers.
In the other systems
| System | Port | Version |
|---|---|---|
| MidnightBSD | devel/py-time-machine | 2.13.0_1 |
| FreeBSD | devel/py-time-machine | 3.5.1 |
| OpenBSD | devel/py-time-machine | 3.2.0 |
| DragonFly | devel/py-time-machine | 2.13.0 |
| HardenedBSD | devel/py-time-machine | 3.5.1 |
| GhostBSD | devel/py-time-machine | 3.5.1 |
Install
Binary package:
mport install ${PYTHON_PKGNAMEPREFIX}time-machine
From mports:
cd /usr/mports/devel/py-time-machine && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}time-machine>0:devel/py-time-machine
Dependencies
As this port's Makefile names them.
Build 1
${PYTHON_PKGNAMEPREFIX}wheel>=0.40.0: devel/py-wheel
Runtime 2
${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.8.2: devel/py-python-dateutil${PYTHON_PKGNAMEPREFIX}six>=1.5: devel/py-six
Build dependencies 1
Run dependencies 2
No port depends on this one.
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| time_machine-2.13.0.tar.gz | 24606 | c23b2408e3adcedec84ea1131e238f0124a5bc0e491f60d1137ad7239b37c01a |
Master sites 1
- PYPI