spulec/freezegun — pull request #50 by Naddiseo (2014-08-18 23:04:12+00:00)
Title: Allow specification of which modules to ignore

This patch adds support for a third parameter, `ignore`, to `freeze_time` which allows the user to specify what additional imported modules they want exempt from freezegun's patching process. By default it'll add the `'six.moves.'` and `'django.utils.six.moves.'` items.

I propose this because I've run into an issue specifically with selenium's [wait.until][1] function which relies on `time.time` and `time.sleep` in order to wait for the webdriver to finish its processing. I didn't want to suggest adding yet another case to the exemption list, and instead thought it would be more extensible to allow the user to specify more modules.

[1]: https://code.google.com/p/selenium/source/browse/py/selenium/webdriver/support/wait.py#60