From 00490522b613128f4bb460c5707359ab32e7c6f4 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Thu, 20 Jun 2024 19:30:46 +0200 Subject: [PATCH] sdk: remove conditional code for python < 3.8 (#3984) --- .../tests/metrics/test_measurement_consumer.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py b/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py index b1f3dc2a38..9d3b9691d6 100644 --- a/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py +++ b/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from sys import version_info from time import sleep from unittest import TestCase from unittest.mock import MagicMock, Mock, patch @@ -175,14 +174,9 @@ def sleep_1(*args, **kwargs): consumer.collect(reader_mock) - if version_info < (3, 8): - callback_options_time_call = mock_callback_options.mock_calls[-1][ - 2 - ]["timeout_millis"] - else: - callback_options_time_call = mock_callback_options.mock_calls[ - -1 - ].kwargs["timeout_millis"] + callback_options_time_call = mock_callback_options.mock_calls[ + -1 + ].kwargs["timeout_millis"] self.assertLess( callback_options_time_call,