diff tests/test_util.py @ 138:40474f6c1f84

diff_cmd: more robust, add tests.
author Augie Fackler <durin42@gmail.com>
date Thu, 11 Dec 2008 19:49:36 -0600
parents e58c2f1de059
children 89a737852d33
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -80,6 +80,9 @@ class MockUI(object):
     def warn(self, *args):
         self.stream.write(*args)
 
+    def write(self, *args):
+        self.stream.write(*args)
+
     def __getattr__(self, attr):
         return getattr(self.inner_ui, attr)
 
@@ -98,6 +101,11 @@ class TestBase(unittest.TestCase):
         os.chdir(self.oldwd)
         ui.ui = self._real_ui
 
+    def _load_fixture_and_fetch(self, fixture_name, subdir='', stupid=False):
+        return load_fixture_and_fetch(fixture_name, self.repo_path,
+                                      self.wc_path, subdir=subdir,
+                                      stupid=stupid)
+
     # define this as a property so that it reloads anytime we need it
     @property
     def repo(self):