Replaced iteritems with a python 3 compatible iterable dict items.

master
Per A Brodtkorb 9 years ago
parent e545a2f025
commit 7923eb3153

@ -31,6 +31,7 @@ Created on 15. des. 2009
# typelib_mso.lcid, # typelib_mso.lcid,
# int(typelib_mso.major), int(typelib_mso.minor)) # int(typelib_mso.major), int(typelib_mso.minor))
from __future__ import absolute_import from __future__ import absolute_import
from six import iteritems # @UnresolvedImport
import os import os
import warnings import warnings
import win32com.client import win32com.client
@ -172,7 +173,7 @@ class Powerpoint(object):
def _add_text_from_dict(self, page, id, txt_dict, # @ReservedAssignment def _add_text_from_dict(self, page, id, txt_dict, # @ReservedAssignment
level, maxlevel=None): level, maxlevel=None):
if maxlevel is None or level <= maxlevel: if maxlevel is None or level <= maxlevel:
for name, subdict in txt_dict.iteritems(): for name, subdict in iteritems(txt_dict):
tr = page.Shapes(id).TextFrame.TextRange.InsertAfter(name) tr = page.Shapes(id).TextFrame.TextRange.InsertAfter(name)
unused_temp = page.Shapes( unused_temp = page.Shapes(
id).TextFrame.TextRange.InsertAfter('\r') id).TextFrame.TextRange.InsertAfter('\r')

@ -1,4 +1,4 @@
from six import iteritems
from numpy.testing import (run_module_suite, assert_equal, assert_almost_equal, from numpy.testing import (run_module_suite, assert_equal, assert_almost_equal,
assert_array_equal, assert_array_almost_equal, assert_array_equal, assert_array_almost_equal,
TestCase, assert_, assert_raises,) TestCase, assert_, assert_raises,)
@ -372,7 +372,7 @@ def test_getshipchar():
service_speed=10, service_speed=10,
service_speedSTD=0) service_speedSTD=0)
for name, val in true_sc.iteritems(): for name, val in iteritems(true_sc):
assert_almost_equal(val, sc[name]) assert_almost_equal(val, sc[name])

Loading…
Cancel
Save