Index: tests/scm_unittest.py |
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py |
index 235f76b2c6e5024dd5db681d48940c3d73f216c0..a9c71c165b66aab9baaf7ffd3397781a15f37aed 100755 |
--- a/tests/scm_unittest.py |
+++ b/tests/scm_unittest.py |
@@ -151,6 +151,18 @@ class SVNTestCase(BaseSCMTestCase): |
# If this test fails, you should add the relevant test. |
self.compareMembers(scm.SVN, members) |
+ def testGetCheckoutRoot(self): |
+ self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo') |
+ scm.os.path.abspath(self.root_dir + 'x').AndReturn(self.root_dir) |
+ result1 = { "Repository Root": "Some root" } |
+ scm.SVN.CaptureInfo(self.root_dir, print_error=False).AndReturn(result1) |
+ results2 = { "Repository Root": "A different root" } |
+ scm.SVN.CaptureInfo(scm.os.path.dirname(self.root_dir), |
+ print_error=False).AndReturn(results2) |
+ self.mox.ReplayAll() |
+ self.assertEquals(scm.SVN.GetCheckoutRoot(self.root_dir + 'x'), |
+ self.root_dir) |
+ |
def testGetFileInfo(self): |
xml_text = r"""<?xml version="1.0"?> |
<info> |