Message208092
Sorry Michael, I should have read your second comment more closely since you already pointed out that using a list as default argument is bad.
It is, however, easily fixed by changing to this:
def reset_mock(self, visited=None):
"Restore the mock object to its initial state."
if visited is None:
visited = []
if id(self) in visited:
return |
|
Date |
User |
Action |
Args |
2014-01-14 12:56:48 | Laurent.De.Buyst | set | recipients:
+ Laurent.De.Buyst, michael.foord, nicola.palumbo |
2014-01-14 12:56:48 | Laurent.De.Buyst | set | messageid: <1389704208.9.0.558617591712.issue18622@psf.upfronthosting.co.za> |
2014-01-14 12:56:48 | Laurent.De.Buyst | link | issue18622 messages |
2014-01-14 12:56:48 | Laurent.De.Buyst | create | |
|