| ▲ | rtpg 5 hours ago | |
I’ve used freezetime (Python) a decent amount and have experienced some very very very funny flakes due to it. - Sometimes your test code expects time to be moving forward - sometimes your code might store classes into a hashmap for caching, and the cache might be built before the freeze time class override kicks in - sometimes it happens after you have patched the classes and now your cache is weirdly poisoned - sometimes some serialization code really cares about the exact class used - sometimes test code acts really weird if time stops moving forward (when people use freezetime frozen=true). Selenium timeouts never clearing was funny - sometimes your code gets a hold of the unpatched date clsss through silliness but only in one spot Fun times. The nicest thing is being able to just pass in a “now” parameter in things that care about time. | ||