Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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)