Exemplo n.º 1
0
 def test_diff_error(self):
     try:
         res = git.diff("HEAD^^^..")
     except Exception, e:
         self.assertEquals(
             str(e), """fatal: ambiguous argument 'HEAD^^^..': unknown """
             """revision or path not in the working tree.\nUse '--' to separate paths from revisions\n"""
         )
Exemplo n.º 2
0
 def test_diff_error(self):
     try:
         res = git.diff("HEAD^^^..")
     except Exception, e:
         self.assertEquals(
             str(e),
             """fatal: ambiguous argument 'HEAD^^^..': unknown """
             """revision or path not in the working tree.\nUse '--' to separate paths from revisions\n""",
         )
Exemplo n.º 3
0
    def test_diff(self):
        res = git.diff("HEAD^..")
        self.assertEquals(
            res, """diff --git a/test2 b/test2
index 180cf83..84a746b 100644
--- a/test2
+++ b/test2
@@ -1 +1,2 @@
 test2
+test3
""")
Exemplo n.º 4
0
    def test_diff(self):
        res = git.diff("HEAD^..")
        self.assertEquals(
            res,
            """diff --git a/test2 b/test2
index 180cf83..84a746b 100644
--- a/test2
+++ b/test2
@@ -1 +1,2 @@
 test2
+test3
""",
        )