Comment 1 for bug 310770

Revision history for this message
Robert Collins (lifeless) wrote :

Jono; this seems like something we shouldn't have in testtools. Rather:
There should be a library for monkey patching.
It should have an API we can trivially use (e.g. it returns (callback, (args), {kwargs}), which users can pass to addCleanup:

def newfoo():
    pass
self.addCleanup(monkey.patch(sys.time, newfoo))

What do you think?