From a2a848a3c15915639e33241a4016846a9e082906 Mon Sep 17 00:00:00 2001 From: Gustavo Niemeyer Date: Tue, 1 Jul 2008 14:05:27 -0300 Subject: Prevent the MockerTestCase base from leaving the mocker in replay mode while the base class run() method runs, since this might have additional logic which touches mocked content (time.time() was one case). Thanks to Thomas for the initial debugging. --- mocker.py | 1 + 1 file changed, 1 insertion(+) (limited to 'mocker.py') diff --git a/mocker.py b/mocker.py index 37e4ddb..e4a8f04 100644 --- a/mocker.py +++ b/mocker.py @@ -115,6 +115,7 @@ class MockerTestCase(unittest.TestCase): result.addCallback(verify) else: self.mocker.verify() + self.mocker.restore() return result # Copy all attributes from the original method.. for attr in dir(test_method): -- cgit v1.2.1