Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Aug 8, 2015
  1. @adamchainz

    PEP8-ify code

    adamchainz authored
Commits on Aug 6, 2015
  1. @adamchainz

    Tidy up tick=True

    adamchainz authored
  2. @zmsmith

    Add tick to keep time moving

    zmsmith authored
Commits on Aug 1, 2015
  1. Merge pull request #105 from adamchainz/decorate_TestCase

    Decorate TestCase subclasses better
Commits on Jul 24, 2015
  1. @adamchainz
Commits on Jul 23, 2015
  1. @adamchainz
Commits on Jun 14, 2015
Commits on Apr 30, 2015
Commits on Apr 13, 2015
  1. @daveFNbuck

    Improves handling of date and datetime objects in freeze_time

    daveFNbuck authored
    By converting date and datetime objects to isoformat and then using dateutil to
    convert to datetime, this freeze_time becomes exposed to more bugs in dateutil
    than strictly necessary. I have found when using hypothesis-datetime to test my
    own libraries in combination with freeze_gun that years earlier than 100 cause
    bugs due to dateutil interpreting them as being in the 20th or 21st centuries.
    This bug is avoided by simply preserving the date or datetime rather than
    serializing and deserializing it.
Commits on Mar 19, 2015
  1. @tleach

    Fix `FakeTime.__call__()` to return the correct value when daylight s…

    tleach authored
    …avings is in effect.
    The previous implementation was dependent on `mktime` which assumes the provided timetuple is in _local_ time.
    The `time_to_freeze` is UTC, so `__call__` was attempting to compensate for this by using `time.timezone` to offset `time_to_freeze`.
    The problem is that when daylight savings is in effect, `time.timezone` is wrong by an hour and consequently `__call__` returns a timestamp which is an hour early.
    This issue can be addressed, and the code made much cleaner, by using simply `calendar.timegm` instead of `mktime`. `calendar.timegm` assumes the given time is in UTC so no timezone adjustment is needed and timestamp will always be correct, daylight savings or otherwise.
Commits on Mar 7, 2015
  1. @jesteria
Commits on Mar 6, 2015
  1. @jesteria

    made class decoration respect py3k again: can ignore staticmethod, bu…

    jesteria authored
    …t just fail gracefully with non-function callables
Commits on Mar 5, 2015
  1. @jesteria
Commits on Feb 10, 2015
  1. @msabramo
Commits on Feb 5, 2015
Commits on Dec 31, 2014
  1. @pelme

    Fixed #73 - replace based on identity (is) comparision.

    pelme authored
    Special objects that overrides __eq__ which always returns True confuses
    the replacement.
    Checking for the replacement functions by identity solves this problem.
    Equal (==) does identity comparisions anyways unless __eq__ is
  2. @pelme

    Fixed #51 - Set __wrapped__ on the decorated function

    pelme authored
    `functools.update_wrapper` and `functools.wraps` sets `__wrapped__` in
    Python >= 3.2, so this fix only affects Python 2.X in freezegun.
    The mock library uses a similar fix:
    This change allows pytest to correctly figure out the real argument
    names and then inject fixtures properly:
Commits on Nov 20, 2014
Commits on Oct 27, 2014
  1. Merge pull request #60 from indradhanush/fix_utcnow_for_timezone_awar…

    Fix utcnow for timezone aware object
Commits on Oct 26, 2014
  1. Fix to not patch classmethods.

Commits on Oct 14, 2014
  1. @indradhanush

    Fixes #59

    indradhanush authored
Commits on Oct 12, 2014
  1. Python3 compat.

Commits on Sep 16, 2014
  1. Merge pull request #54 from imankulov/fix_astimezone

    Fix astimezone
Commits on Sep 14, 2014
  1. @imankulov
  2. @imankulov

    Fix isinstance verification in tests

    imankulov authored
    The FakeDateMeta metaclass addition made some assertions "always valid":
    the issubclass(obj, FakeDatetime) returns true both for fake and
    original datetime objects.
    To fix it a new set of helper functions was added. They test for exact
    obj.__class__ match instead.
Commits on Sep 13, 2014
  1. Allow multiple nested invocations of freeze_time

    Tye Wang authored
Commits on Sep 8, 2014
  1. Renames tests with duplicate test names

    Tye Wang authored
  2. Removed unused imports

    Tye Wang authored
Commits on Aug 14, 2014
Commits on Aug 6, 2014
  1. @eternicode

    Decorate instead of injecting a mixin, so that super()-l…

    eternicode authored
    …ess setUp doesn't break things
Commits on May 22, 2014
  1. @robgolding63

    Make return a FakeDateTime with no timezone…

    robgolding63 authored
    … info
    ...rather than a FakeDate. is effectively an alias
    for, but freezegun was returning a FakeDate
    object instead of a FakeDateTime.
Commits on Apr 16, 2014
Commits on Mar 21, 2014
  1. Fix for pickling utcnow.

Something went wrong with that request. Please try again.