'Test that a running iterator will not run to completion when the
cooperator is stopped.'

def testStopRunning(self):

    c = task.Cooperator()
    def myiter():
        for myiter.value in range(3):
            (yield myiter.value)
    myiter.value = (-1)
    d = c.coiterate(myiter())
    d.addCallback(self.cbIter)
    d.addErrback(self.ebIter)
    c.stop()
    def doasserts(result):
        self.assertEqual(result, self.RESULT)
        self.assertEqual(myiter.value, (-1))
    d.addCallback(doasserts)
    return d
