BSD Ports

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

SystemPortVersion
MidnightBSDdevel/py-time-machine2.13.0_1
FreeBSDdevel/py-time-machine3.5.1
OpenBSDdevel/py-time-machine3.2.0
DragonFlydevel/py-time-machine2.13.0
HardenedBSDdevel/py-time-machine3.5.1
GhostBSDdevel/py-time-machine3.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

Runtime 2

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
FileSizeSHA256
time_machine-2.13.0.tar.gz24606c23b2408e3adcedec84ea1131e238f0124a5bc0e491f60d1137ad7239b37c01a
Master sites 1
  • PYPI