def test_stack_info(self): """ If we ask for stack_info, it will returned. """ logger = _FixedFindCallerLogger("test") testing, is_, fun, stack_info = logger.findCaller(stack_info=True) assert "testing, is_, fun" in stack_info
def test_no_stack_info_by_default(self): logger = _FixedFindCallerLogger('test') testing, is_, fun, stack_info = logger.findCaller() assert None is stack_info
def test_stack_info(self): logger = _FixedFindCallerLogger('test') testing, is_, fun, stack_info = logger.findCaller(stack_info=True) assert 'testing, is_, fun' in stack_info
def test_deduces_correct_caller(self): logger = _FixedFindCallerLogger('test') file_name, line_number, func_name = logger.findCaller()[:3] assert file_name == os.path.realpath(__file__) assert func_name == 'test_deduces_correct_caller'
def test_stack_info(self): logger = _FixedFindCallerLogger("test") testing, is_, fun, stack_info = logger.findCaller(stack_info=True) assert "testing, is_, fun" in stack_info