[TIP] Recording changes and asserting an empty mock list in python unittest

Barbu Paul Gheorghe paullik.paul at gmail.com
Thu Apr 26 06:55:12 PDT 2012


On 04/26/2012 04:13 PM, Dirk Wallenstein wrote:

>          my_list[:] = []

That solved my problem!

> You did hide the real problem by adding the create=True argument.

In that POC, yes, in my real code that list existed anyway because it came from 
another module.

Thank you!

-- 
Barbu Paul - Gheorghe
Common sense is not so common - Voltaire
Visit My GitHub profile to see my open-source projects - https://github.com/paullik



More information about the testing-in-python mailing list