You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be useful to do something like the following to ensure all open() calls have a corresponding close(). Unfortunately it's a lot more cumbersome ATM due to inability to directly proxy for instances of builtin objects.
real_open=opendefwrap_open(*k, *kw):
""" this could be a lambda one-liner even"""f=real_open(*k, **kw)
flexmock(f).should_call('close').with_args().oncereturnfflexmock(__builtins__, open=wrap_open)
Original issue: has207/flexmock#82
The text was updated successfully, but these errors were encountered: