Exemplo n.º 1
0
def where (co):
    """Return a string indicating where the given coroutine thread is currently
    running.

    :Parameters:
        - `co`: The coroutine object.

    :Return:
        Returns a string displaying where the coro thread is currently
        executing.
    """
    f = co.get_frame()
    return tb.stack_string(f)
Exemplo n.º 2
0
def where(co):
    """Return a string indicating where the given coroutine thread is currently
    running.

    :Parameters:
        - `co`: The coroutine object.

    :Return:
        Returns a string displaying where the coro thread is currently
        executing.
    """
    f = co.get_frame()
    return tb.stack_string(f)
Exemplo n.º 3
0
 def test_stack_string(self):
     ss = tb.stack_string()
     if not ss.startswith('[test_tb.py test_stack_string|16] '):
         self.fail('Did not start correctly: %r' % (ss, ))
Exemplo n.º 4
0
 def test_stack_string(self):
     ss = tb.stack_string()
     if not ss.startswith('[test_tb.py test_stack_string|16] '):
         self.fail('Did not start correctly: %r' % (ss,))