Beispiel #1
0
 def test_iterator(self):
     '''Test iterator examples'''
     self._printf('%sasizeof(%s, code=%s) ... %s', os.linesep, '<iterator>', False, '-iter[ator]')
     o = iter('0123456789')
     e = iter('')
     d = iter({})
     i = iter(asizeof._items({1:1}))
     k = iter(asizeof._keys({2:2, 3:3}))
     v = iter(asizeof._values({4:4, 5:5, 6:6}))
     l = iter([])
     t = iter(())
     asizeof.asizesof(o, e, d, i, k, v, l, t, limit=0, code=False, stats=1)
     asizeof.asizesof(o, e, d, i, k, v, l, t, limit=9, code=False, stats=1)
Beispiel #2
0
 def test_iterator(self):
     '''Test iterator examples'''
     self._printf('%sasizeof(%s, code=%s) ... %s', os.linesep, '<iterator>', False, '-iter[ator]')
     o = iter('0123456789')
     e = iter('')
     d = iter({})
     i = iter(asizeof._items({1:1}))
     k = iter(asizeof._keys({2:2, 3:3}))
     v = iter(asizeof._values({4:4, 5:5, 6:6}))
     l = iter([])
     t = iter(())
     asizeof.asizesof(o, e, d, i, k, v, l, t, limit=0, code=False, stats=1)
     asizeof.asizesof(o, e, d, i, k, v, l, t, limit=9, code=False, stats=1)