changeset 37982:ac865f020b99

tests: port test-extensions-wrapfunction to Python 3 Differential Revision: https://phab.mercurial-scm.org/D3527
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 13:39:45 -0400
parents a2cfea193040
children 6eca47f6319d
files contrib/python3-whitelist tests/test-extensions-wrapfunction.py
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Fri Apr 27 13:15:51 2018 -0400
+++ b/contrib/python3-whitelist	Fri Apr 27 13:39:45 2018 -0400
@@ -150,6 +150,7 @@
 test-export.t
 test-extdata.t
 test-extdiff.t
+test-extensions-wrapfunction.py
 test-extra-filelog-entry.t
 test-filebranch.t
 test-filecache.py
--- a/tests/test-extensions-wrapfunction.py	Fri Apr 27 13:15:51 2018 -0400
+++ b/tests/test-extensions-wrapfunction.py	Fri Apr 27 13:39:45 2018 -0400
@@ -35,7 +35,7 @@
         print('unwrap %s: %s: %s' % (getid(w), getid(result), msg))
 
 batchwrap(wrappers + [wrappers[0]])
-batchunwrap([(wrappers[i] if i >= 0 else None)
+batchunwrap([(wrappers[i] if i is not None and i >= 0 else None)
              for i in [3, None, 0, 4, 0, 2, 1, None]])
 
 wrap0 = extensions.wrappedfunction(dummy, 'getstack', wrappers[0])