Skip to content

Commit 1db9d08

Browse files
committed
comments
1 parent d5de8cf commit 1db9d08

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

opentelemetry-api/tests/metrics/test_measurement.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,16 @@
1919

2020
class TestMeasurement(TestCase):
2121
def test_measurement_init(self):
22-
# int
23-
Measurement(321, {"hello": "world"})
22+
try:
23+
# int
24+
Measurement(321, {"hello": "world"})
2425

25-
# float
26-
Measurement(321.321, {"hello": "world"})
26+
# float
27+
Measurement(321.321, {"hello": "world"})
28+
except Exception: # pylint: disable=broad-except
29+
self.fail(
30+
"Unexpected exception raised when instantiating Measurement"
31+
)
2732

2833
def test_measurement_equality(self):
2934
self.assertEqual(

0 commit comments

Comments
 (0)