spulec/freezegun — pull request #18 by PuercoPop (2013-04-10 18:33:28+00:00)
Title: Fix for py.test

In order for freeze gun to play well with py.test

The issue is that some modules apparently don't have a __name__ (it appears to be lazy loaded) Just adding a check for the __name__ attribute before trying to access it.

Test case showing that freezegun and py.test didn't work well together. https://gist.github.com/PuercoPop/5357159