'Calling start() twice should raise an error, not deadlock.'

def test_reentrant(self):

    returned_from_start = [False]
    got_exception = [False]
    def callback():
        try:
            self.io_loop.start()
            returned_from_start[0] = True
        except Exception:
            got_exception[0] = True
        self.stop()
    self.io_loop.add_callback(callback)
    self.wait()
    self.assertTrue(got_exception[0])
    self.assertFalse(returned_from_start[0])
