`select( =...)` raises ValueError for values not in show_options().
()
| 241 | |
| 242 | |
| 243 | def 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 | |
| 258 | def test_select_mic() -> None: |