(r, resp2_expected, resp3_expected, unified_expected)
| 894 | |
| 895 | |
| 896 | def _select_expected(r, resp2_expected, resp3_expected, unified_expected): |
| 897 | match expected_response_shape(r): |
| 898 | case "legacy_resp2": |
| 899 | return resp2_expected |
| 900 | case "legacy_resp3": |
| 901 | return resp3_expected |
| 902 | case "unified": |
| 903 | # Fall back to ``resp3_expected`` when no dedicated |
| 904 | # ``unified_expected`` is supplied, since unified shapes are |
| 905 | # typically RESP3-style with only a few divergences. |
| 906 | if unified_expected is _UNSET: |
| 907 | return resp3_expected |
| 908 | return unified_expected |
| 909 | case other: |
| 910 | raise ValueError(f"unknown response shape: {other!r}") |
| 911 | |
| 912 | |
| 913 | def assert_resp_response( |
no test coverage detected