MCPcopy
hub / github.com/JerBouma/FinanceDatabase / test_select_with_invalid_value_raises

Function test_select_with_invalid_value_raises

tests/test_equities.py:243–255  ·  view source on GitHub ↗

`select( =...)` raises ValueError for values not in show_options().

()

Source from the content-addressed store, hash-verified

241
242
243def test_select_with_invalid_value_raises() -> None:
244 """`select(<filter>=...)` raises ValueError for values not in show_options()."""
245 for col in [
246 "country",
247 "sector",
248 "industry_group",
249 "industry",
250 "exchange",
251 "mic",
252 ]:
253 kwargs: dict[str, Any] = {col: "__definitely_not_a_real_value__"}
254 with pytest.raises(ValueError, match="not available in the database"):
255 equities.select(**kwargs)
256
257
258def test_select_mic() -> None:

Callers

nothing calls this directly

Calls 1

selectMethod · 0.45

Tested by

no test coverage detected