def test_iter(self):
	src, dst = self.makegraph(2, 2)
	p = self.shpaths(dst, src)
	it = iter(p)
	ss = []
	for i in it:
	    ss.append(str(i))
	ss.sort()
	self.aseq(ss, ['%s[0][0]', '%s[0][1]', '%s[1][0]', '%s[1][1]'])

	# Check that we can get some of the first values from the iterator
	# of a graph with an astronomical number of paths.

	width = 11
	length = 13
	numpaths = 20
	src, dst = self.makegraph(width, length)
	p = self.shpaths(dst, src)
	it = iter(p)
	for i in range(numpaths):
	    path =  it.next()
	    sp = str(path)
	    div, mod = divmod(i, width)
	    self.aseq(sp, '%s'+'[0]'*(length-2)+'[%d][%d]'%(div, mod))

	# Check that the iterator works even if the graph initially
	# would yield astronomical numbers of dead ends.
	# (The initial algorithm took astronomically long time.)

	osrc = src
	#osrc = [[],[]]

	src, dst = self.makegraph(width, length)
	src[0] = osrc
	p = self.shpaths(dst, src)
	it = iter(p)
	for i in range(numpaths):
	    path =  it.next()
	    sp = str(path)
	    div, mod = divmod(i, width)
	    self.aseq(sp, '%s[1]'+'[0]'*(length-3)+'[%d][%d]'%(div, mod))
	    #print sp

	# Test iterating with a negative start and a large positive start

	numfromend = width / 2
	for it in [p.iter(-numfromend), p.iter(p.numpaths-numfromend)]:
	    for i, path in enumerate(it):
		sp = str(path)
		self.aseq(sp, '%s'+((width-1)%'[%d]')*(length-1)+'[%d]'%(width-numfromend+i))

	# Test iterating with start and stop

	start = 5
	stop = 25
	i = start
	for path in p.iter(start, stop):
	    sp = str(path)
	    div, mod = divmod(i, width)
	    self.aseq(sp, '%s[1]'+'[0]'*(length-3)+'[%d][%d]'%(div, mod))
	    self.aseq(path.index, i)
	    i += 1
	self.aseq(i, stop)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_Path.py/PathTestCase.test_iter/swapped operands of `%`