diff --git a/opentelemetry-sdk/tests/trace/export/test_export.py b/opentelemetry-sdk/tests/trace/export/test_export.py index 7a29ef3c42..4ce611c932 100644 --- a/opentelemetry-sdk/tests/trace/export/test_export.py +++ b/opentelemetry-sdk/tests/trace/export/test_export.py @@ -519,7 +519,8 @@ def test_batch_span_processor_reset_timeout(self): # since wait is mocked it should return immediately time.sleep(0.1) mock_wait_calls = list(mock_wait.mock_calls) - + # Initialize after_calls to avoid UnboundLocalError + after_calls = [] # find the index of the call that processed the singular span for idx, wait_call in enumerate(mock_wait_calls): _, args, __ = wait_call