Message6482
I think that looks OK, but the test should have everything that uses the
patched date.Date inside a
date.Date = dummyDate()
try:
... rest of test contents ...
finally:
date.Date = originalDate
to ensure that the patching is undone if an exception occurs during the
test code. (Once we can assume Python 3, unittest.mock.patch can be used
for this.) |
|
Date |
User |
Action |
Args |
2019-05-24 20:25:26 | joseph_myers | set | recipients:
+ joseph_myers, rouilj |
2019-05-24 20:25:26 | joseph_myers | link | issue2551033 messages |
2019-05-24 20:25:26 | joseph_myers | create | |
|