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

login
register
mail settings
Submitter Julien Cristau
Date Aug. 31, 2015, 7:54 a.m.
Message ID <89490230b42b553e8f66.1441007687@sh76.dev.logilab.fr>
Download mbox | patch
Permalink /patch/10332/
State Accepted
Headers show

Comments

Julien Cristau - Aug. 31, 2015, 7:54 a.m.
# HG changeset patch
# User Julien Cristau <julien.cristau@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
Matt Mackall - Aug. 31, 2015, 10:37 p.m.
On Mon, 2015-08-31 at 09:54 +0200, Julien Cristau wrote:
> # HG changeset patch
> # User Julien Cristau <julien.cristau@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

Queued, thanks.

Patch

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)