Skip to content

Commit

Permalink
sdk: remove conditional code for python < 3.8 (#3984)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored Jun 20, 2024
1 parent 3842a09 commit 0049052
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions opentelemetry-sdk/tests/metrics/test_measurement_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0049052

Please sign in to comment.