Metadata-Version: 1.1
Name: libfaketime
Version: 0.2.1
Summary: A fast alternative to freezegun that wraps libfaketime.
Home-page: http://pypi.python.org/pypi/libfaketime/
Author: Simon Weber
Author-email: simon@simonmweber.com
License: GPLv2
Description: python-libfaketime: fast date/time mocking
        ==========================================
        
        python-libfaketime is a wrapper of `libfaketime <https://github.com/wolfcw/libfaketime>`__ for python.
        
        .. code-block:: python
        
            import datetime
        
            from libfaketime import fake_time, reexec_if_needed
        
            # libfaketime needs to be preloaded by the dynamic linker.
            # This will exec the same command, but with the proper environment variables set.
            # Or you can skip running this and manually manage your env (see get_reload_information()).
            reexec_if_needed()
        
            def get_tomorrow():
                return datetime.date.today() + datetime.timedelta(days=1)
        
        
            @fake_time('2014-01-01 00:00:00')
            def test_get_tomorrow():
                assert get_tomorrow() == datetime.date(2014, 1, 2)
         
        
        It serves as a fast drop-in replacement for `freezegun <https://github.com/spulec/freezegun>`__.
        Here's the output of a `totally unscientific benchmark <https://github.com/simon-weber/python-libfaketime/blob/master/benchmark.py>`__ on my laptop::
        
            $ python benchmark.py
            re-exec with libfaketime dependencies
            timing 1000 executions of <class 'libfaketime.fake_time'>
            0.021755 seconds
        
            $ python benchmark.py freezegun
            timing 1000 executions of <function freeze_time at 0x10aaa1140>
            6.561472 seconds
        
        
        Some brief details:
        
        * linux and osx
        * microsecond resolution
        * accepts datetimes and strings that can be parsed by dateutil
        * not threadsafe
        * will break profiling. A workaround: use ``libfaketime.{begin, end}_callback`` to disable/enable your profiler.
                
        
        To install: ``pip install libfaketime``.
        
        
        .. :changelog:
        
        Changelog
        ---------
        
        `Semantic versioning <http://semver.org/>`__ is used.
        
        0.2.1
        +++++
        released 2016-03-01
        
        - python 3 support
        
        0.1.1
        +++++
        released 2015-09-11
        
        - prevent distribution of test directory: https://github.com/simon-weber/python-libfaketime/pull/4
        
        0.1.0
        +++++
        released 2015-06-23
        
        - add global start/stop callbacks
        
        0.0.3
        +++++
        released 2015-03-28
        
        - initial packaged release
        
Platform: UNKNOWN
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries :: Python Modules
