From 975700a23e0927159a0f7b9ff8de7086534925a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Wed, 4 Sep 2024 16:29:12 +0200 Subject: [PATCH] Fix PyPy json loads --- .../tests/metrics/integration_test/test_console_exporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py b/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py index 18dcd0da5b8..7e77a878d87 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py @@ -14,6 +14,7 @@ from io import StringIO from json import loads +from os import linesep from unittest import TestCase from unittest.mock import Mock, patch @@ -117,7 +118,8 @@ def test_console_exporter_with_exemplars(self): provider.shutdown() output.seek(0) - result_0 = loads("".join(output.readlines())) + joined_output = "".join(output.readlines()) + result_0 = loads(joined_output.strip(linesep)) self.assertGreater(len(result_0), 0)