diff tests/test-pathencode.py @ 36360:58c1368ab629

py3: use dict.items() instead of dict.iteritems() in tests dict.iteritems() is not present in Python 3. Differential Revision: https://phab.mercurial-scm.org/D2353
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Feb 2018 21:18:52 +0530
parents d43340bec0f5
children 1b230e19d044
line wrap: on
line diff
--- a/tests/test-pathencode.py	Mon Feb 19 15:28:54 2018 +0530
+++ b/tests/test-pathencode.py	Mon Feb 19 21:18:52 2018 +0530
@@ -64,7 +64,7 @@
         counts.pop(c, None)
     t = sum(counts.itervalues()) / 100.0
     fp.write('probtable = (')
-    for i, (k, v) in enumerate(sorted(counts.iteritems(), key=lambda x: x[1],
+    for i, (k, v) in enumerate(sorted(counts.items(), key=lambda x: x[1],
                                       reverse=True)):
         if (i % 5) == 0:
             fp.write('\n    ')