mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 02:42:36 +00:00
* quick econ fix * black * keys and feature flags * terminal name 👀 * some more replacements * some more replacements * edit pyproject * gst -> openbb * add example portfolios back to git * Update api from gst * sorry. skipping some tests * another round of names * another round of test edits * Missed some .gst refs and update timezone * water mark stuff * Fixing Names in terminal.spec and name of GTFF_DEFAULTS to OBBFF_DEFAULTS * fix more GST to OpenBB Terminal * Logging : merge conflicts with main * Revert wrong files Co-authored-by: Andrew <andrew.kenreich@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt> Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
25 lines
730 B
Python
25 lines
730 B
Python
# IMPORTATION STANDARD
|
|
|
|
# IMPORTATION THIRDPARTY
|
|
import pandas as pd
|
|
import pytest
|
|
|
|
# IMPORTATION INTERNAL
|
|
from openbb_terminal.economy import yfinance_model
|
|
|
|
|
|
@pytest.mark.vcr
|
|
@pytest.mark.parametrize(
|
|
"index, interval, start_date, end_date, column",
|
|
[
|
|
["sp500", "1d", "2022-01-01", "2022-02-02", "Adj Close"],
|
|
["nasdaq", "1wk", "2020-06-06", "2020-07-07", "Close"],
|
|
["dowjones", "1mo", "2015-01-01", "2015-02-02", "Volume"],
|
|
["cac40", "3mo", "2010-01-01", "2016-02-06", "High"],
|
|
],
|
|
)
|
|
def test_get_index(index, interval, start_date, end_date, column):
|
|
result_df = yfinance_model.get_index(index, interval, start_date, end_date, column)
|
|
|
|
assert isinstance(result_df, pd.Series)
|