def test_no_nested_function_tracing_log_records_when_trace_disabled(self): named_tracer.setLevel(logging.DEBUG) nested_function = traced_function(None) self.assertEqual(2, len(list_handler.records)) nested_function(None) self.assertEqual(2, len(list_handler.records))
def test_nested_function_tracing_log_records_when_enclosing_trace_disabled(self): dummy_module_logger.setLevel(logging.DEBUG) nested_function = traced_function(None) self.assertEqual(0, len(list_handler.records)) nested_function(None) self.assertEqual(2, len(list_handler.records))
def test_nested_function_tracing_log_records_when_enclosing_trace_disabled( self): dummy_module_logger.setLevel(logging.DEBUG) nested_function = traced_function(None) self.assertEqual(0, len(list_handler.records)) nested_function(None) self.assertEqual(2, len(list_handler.records))
def test_traced_function_tracing_log_records(self): nested_function = traced_function(None) self.assertEqual(2, len(list_handler.records)) self._assert_call_record(list_handler.records[0], traced_function.__wrapped__, "test.dummy", ((None, ), dict()), "t_f") self._assert_return_record(list_handler.records[1], traced_function.__wrapped__, "test.dummy", (nested_function, ), "t_f")
def test_traced_function_tracing_log_records(self): nested_function = traced_function(None) self.assertEqual(2, len(list_handler.records)) self._assert_call_record( list_handler.records[0], traced_function.__wrapped__, "test.dummy", ((None,), dict()), "t_f") self._assert_return_record( list_handler.records[1], traced_function.__wrapped__, "test.dummy", (nested_function,), "t_f")
def test_nested_function_tracing_log_records(self): nested_function = traced_function(None) value = nested_function(None) self.assertEqual("t_f.n_f None and None", value) self.assertEqual(4, len(list_handler.records)) self._assert_call_record( list_handler.records[2], nested_function.__wrapped__, "traced.testing", ((None,), dict()), "t_f.n_f") self._assert_return_record( list_handler.records[3], nested_function.__wrapped__, "traced.testing", ("t_f.n_f None and None",), "t_f.n_f")
def test_nested_function_tracing_log_records(self): nested_function = traced_function(None) value = nested_function(None) self.assertEqual("t_f.n_f None and None", value) self.assertEqual(4, len(list_handler.records)) self._assert_call_record(list_handler.records[2], nested_function.__wrapped__, "traced.testing", ((None, ), dict()), "t_f.n_f") self._assert_return_record(list_handler.records[3], nested_function.__wrapped__, "traced.testing", ("t_f.n_f None and None", ), "t_f.n_f")