Verify search() output for representative equity queries.
(recorder: Recorder)
| 217 | |
| 218 | |
| 219 | def 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 | |
| 243 | def test_select_with_invalid_value_raises() -> None: |