Commits

fudanchii  committed fafe8fa

Update test for hg branch with bookmark extension.
Add test for hg_version and hg_clone.

  • Participants
  • Parent commits b0cf9de

Comments (0)

Files changed (1)

File hgapi/testhgapi.py

 
         # create a new branch, should still be default in branches until we commit
         # but branch should return the new branch
-        self.assertEquals(self.repo.hg_branch('test_branch'),
+        self.assertEquals(self.repo.hg_branch('test_branch').split("\n")[0],
             "marked working directory as branch test_branch")
         self.assertEquals(self.repo.hg_branch(), "test_branch")
         branches = self.repo.get_branches()
         branch_names = self.repo.get_branch_names()
         self.assertEquals(len(branch_names), 2)
 
+    def test_200_version(self):
+        self.assertNotEquals(hgapi.hg_version(), "")
+
+    def test_210_clone(self):
+        repo = hgapi.hg_clone("./test", "./test-clone")
+        self.assertTrue(isinstance(repo, hgapi.Repo))
+        self.assertEquals(repo.path, self.repo.path + "-clone")
+        shutil.rmtree("test-clone")
+
 def test_doc():
     #Prepare for doctest
     os.mkdir("./test_hgapi")