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

Function test_search

tests/test_equities.py:219–240  ·  view source on GitHub ↗

Verify search() output for representative equity queries.

(recorder: Recorder)

Source from the content-addressed store, hash-verified

217
218
219def test_search(recorder: Recorder) -> None:
220 """Verify search() output for representative equity queries."""
221 recorder.capture(equities.search(summary="apple").iloc[:5])
222 recorder.capture(equities.search(index="AAPL").iloc[:5])
223 recorder.capture(equities.search(country="Canada").iloc[:5])
224 recorder.capture(equities.search(sector="Communication Services").iloc[:5])
225 recorder.capture(equities.search(industry_group="Insurance").iloc[:5])
226 recorder.capture(equities.search(market_cap="Large Cap").iloc[:5])
227 recorder.capture(
228 equities.search(country="United States", sector="Financials").iloc[:5]
229 )
230 recorder.capture(
231 equities.search(
232 country="United States", industry_group="Media & Entertainment"
233 ).iloc[:5]
234 )
235 recorder.capture(equities.search(sector="Energy", industry_group="Energy").iloc[:5])
236 recorder.capture(
237 equities.search(
238 country="United States", sector="Industrials", industry_group="Software"
239 ).iloc[:5]
240 )
241
242
243def test_select_with_invalid_value_raises() -> None:

Callers

nothing calls this directly

Calls 2

captureMethod · 0.80
searchMethod · 0.80

Tested by

no test coverage detected