changeset 38563:b9724978633e

tests: update test-context.py to use diffopts as diff argument
author Boris Feld <boris.feld@octobus.net>
date Sat, 23 Jun 2018 13:26:23 +0100
parents c88d2c9b00dd
children 64f15e22f4f8
files tests/test-context.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-context.py	Thu Jun 28 16:11:13 2018 +0200
+++ b/tests/test-context.py	Sat Jun 23 13:26:23 2018 +0100
@@ -10,6 +10,7 @@
     scmutil,
     ui as uimod,
 )
+from mercurial.utils import diffutil
 
 print_ = print
 def print(*args, **kwargs):
@@ -76,8 +77,8 @@
 print(ctxb.status(ctxa))
 
 # test performing a diff on a memctx
-
-for d in ctxb.diff(ctxa, opts={'git': True}):
+diffopts = diffutil.diffopts(repo.ui, {'git': True})
+for d in ctxb.diff(ctxa, opts=diffopts):
     printb(d, end=b'')
 
 # test safeness and correctness of "ctx.status()"