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 18dcd0da5b..7e77a878d8 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)