(registry, expected_error)
| 466 | |
| 467 | |
| 468 | def _expect_metric_exception(registry, expected_error): |
| 469 | try: |
| 470 | generate_latest(registry, openmetrics.ALLOWUTF8) |
| 471 | except expected_error as exception: |
| 472 | assert isinstance(exception.args[-1], core.Metric) |
| 473 | # Got a valid error as expected, return quietly |
| 474 | return |
| 475 | |
| 476 | raise RuntimeError('Expected exception not raised') |
| 477 | |
| 478 | |
| 479 | @pytest.mark.parametrize('MetricFamily', [ |
no test coverage detected