def test_generator(self):
        '''Test generator examples'''
        self._printf('%sasizeof(%s, code=%s) ... %s', os.linesep, '<generator>', True, '-gen[erator]')
        def gen(x):
            i = 0
            while i < x:
                yield i
                i += 1
        a = gen(5)
        b = gen(50)
        asizeof.asizeof(a, code=True, stats=1)
        asizeof.asizeof(b, code=True, stats=1)
        asizeof.asizeof(a, code=True, stats=1)
dataset/ETHPy150Open pympler/pympler/test/asizeof/test_asizeof.py/AsizeofDemos.test_generator/original