def test_thread_id(s, a, b): assert s.thread_id == a.thread_id == b.thread_id == get_thread_identity()
def test_identifier(): frame = sys._current_frames()[get_thread_identity()] assert identifier(frame) == identifier(frame) assert identifier(None) == identifier(None)
def test_call_stack(): frame = sys._current_frames()[get_thread_identity()] L = call_stack(frame) assert isinstance(L, list) assert all(isinstance(s, str) for s in L) assert "test_call_stack" in str(L[-1])
def test_call_stack(): frame = sys._current_frames()[get_thread_identity()] L = call_stack(frame) assert isinstance(L, list) assert all(isinstance(s, str) for s in L) assert 'test_call_stack' in str(L[-1])