コード例 #1
0
 def test_patch_and_restore(self):
     cleanup = monkeypatch(
         'testrepository.tests.test_monkeypatch.reference', 45)
     self.assertEqual(45, reference)
     cleanup()
     self.assertEqual(23, reference)
コード例 #2
0
 def stub__find_command(self, cmd_run):
     self.calls = []
     self.addCleanup(monkeypatch('testrepository.commands._find_command',
         self._find_command))
     self.cmd_run = cmd_run
コード例 #3
0
 def stub__find_command(self, cmd_run):
     self.calls = []
     self.addCleanup(
         monkeypatch('testrepository.commands._find_command',
                     self._find_command))
     self.cmd_run = cmd_run
コード例 #4
0
 def test_patch_and_restore(self):
     cleanup = monkeypatch(
         'testrepository.tests.test_monkeypatch.reference', 45)
     self.assertEqual(45, reference)
     cleanup()
     self.assertEqual(23, reference)