[PATCH hglib] tests: update test-summary for mercurial 3.5

Julien Cristau julien.cristau at logilab.fr
Mon Aug 31 07:54:47 UTC 2015


# HG changeset patch
# User Julien Cristau <julien.cristau at logilab.fr>
# Date 1441007554 -7200
#      Mon Aug 31 09:52:34 2015 +0200
# Node ID 89490230b42b553e8f6676dd08f69c84d0ad7eb0
# Parent  e0678dfb7aeca9fb368ccb354e4cdec93189b208
tests: update test-summary for mercurial 3.5

changeset 1ef96a3b8b89 added some phases information to 'hg summary'.

Reported at https://bugs.debian.org/797287

diff --git a/tests/test-summary.py b/tests/test-summary.py
--- a/tests/test-summary.py
+++ b/tests/test-summary.py
@@ -17,10 +17,12 @@ class test_summary(common.basetest):
 
         d = {b('parent') : [(0, node[:12], b('tip'), b('first'))],
              b('branch') : b('default'),
              b('commit') : True,
              b('update') : 0}
+        if self.client.version >= (3, 5):
+            d[b('phases')] = '1 draft'
 
         self.assertEquals(self.client.summary(), d)
 
     def test_commit_dirty(self):
         self.append('a', 'a')
@@ -29,10 +31,12 @@ class test_summary(common.basetest):
 
         d = {b('parent') : [(0, node[:12], b('tip'), b('first'))],
              b('branch') : b('default'),
              b('commit') : False,
              b('update') : 0}
+        if self.client.version >= (3, 5):
+            d[b('phases')] = '1 draft'
 
         self.assertEquals(self.client.summary(), d)
 
     def test_update(self):
         self.append('a', 'a')
@@ -43,10 +47,12 @@ class test_summary(common.basetest):
 
         d = {b('parent') : [(0, node[:12], None, b('first'))],
              b('branch') : b('default'),
              b('commit') : True,
              b('update') : 1}
+        if self.client.version >= (3, 5):
+            d[b('phases')] = '2 draft'
 
         self.assertEquals(self.client.summary(), d)
 
     def test_remote(self):
         self.append('a', 'a')
@@ -88,10 +94,12 @@ class test_summary(common.basetest):
         if self.client.version < (2, 0, 0):
             tags = b('tip bmother')
         else:
             tags = b('tip')
         d[b('parent')] = [(1, node[:12], tags, b('second in other'))]
+        if self.client.version >= (3, 5):
+            d[b('phases')] = '1 draft'
 
         self.assertEquals(other.summary(remote=True), d)
 
     def test_two_parents(self):
         self.append('a', 'a')
@@ -109,7 +117,9 @@ class test_summary(common.basetest):
         d = {b('parent') : [(2, node2[:12], b('tip'), b('third')),
                          (1, node1[:12], None, b('second'))],
              b('branch') : b('default'),
              b('commit') : False,
              b('update') : 0}
+        if self.client.version >= (3, 5):
+            d[b('phases')] = '3 draft'
 
         self.assertEquals(self.client.summary(), d)


More information about the Mercurial-devel mailing list