1. Fredrik Håård
  2. hgapi

Commits

Jan Willems  committed 9f669f1

Fixed some documentation typo's and improved some tests,

  • Participants
  • Parent commits 3cd948e
  • Branches default

Comments (0)

Files changed (2)

File hgapi/hgapi.py

View file
     def hg_add(self, filepath=None):
         """
         Add a file to the repo; when no filepath is given,
-        the hg add all files are added to the repo.
+        all files are added to the repo.
         """
         if filepath is None:
             self.hg_command("add")
     def hg_addremove(self, filepath=None):
         """
         Add a file to the repo; when no filepath is given,
-        the hg add all files are added to the repo.
+        all files are added and removed to and respectively
+        from the repo.
         """
         if filepath is None:
             self.hg_command("addremove")

File hgapi/testhgapi.py

View file
         with open("test/file.txt", "w") as out:
             out.write("stuff")
         self.repo.hg_add("file.txt")
+        self.assertListEqual(self.repo.hg_status()['A'], ['file.txt'])
 
     def test_021_Add(self):
         with open("test/foo.txt", "w") as out:
         with open("test/bar.txt", "w") as out:
             out.write("Another sample file")
         self.repo.hg_add()
+        self.assertListEqual(self.repo.hg_status()['A'], ['bar.txt', 'file.txt', 'foo.txt'])
 
     def test_030_Commit(self):
         #Commit and check that we're on a real revision