[TIP] Asserting all opened files have been closed
jens.rantil at gmail.com
Sat Aug 11 03:12:33 PDT 2012
I have started using the Mock
more. It's great for some things that are hard to test otherwise.
At the same time, some of its concepts can be a little daunting to wrap my
That said, I have a test where I assert that all my opened files have been
properly closed throughout the lifetime of my application. It took me a
while to figure out how to write it. The current state of art can be found
I have to admit the code is quite cumbersome. So my question is, *can this
be done in a more compact/efficient manner?* I've been studying the "Mocking
example, but since I am not interested in asserting what was written, nor
read, it is not really helpful to me.
Oh, and as always, feel free to point me to any older threads discussing
this. I wish this mailing list was searchable...
Want to know how full my inbox is? Or how to get in touch with me faster?
Or tell me your e-mail is not that important? Then check this out:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python