mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-30 05:52:23 +00:00
Fix regression in tests. Lint
This commit is contained in:
@@ -784,9 +784,9 @@ def test_stocks_options_chains(params, headers):
|
||||
"ignore_tz": True,
|
||||
"provider": "yfinance",
|
||||
"symbol": "AAPL",
|
||||
"start_date": "2023-01-01",
|
||||
"end_date": "2023-01-02",
|
||||
"interval": "1m",
|
||||
"start_date": "2023-06-01",
|
||||
"end_date": "2023-06-03",
|
||||
"interval": "1h",
|
||||
}
|
||||
),
|
||||
(
|
||||
@@ -807,6 +807,8 @@ def test_stocks_options_chains(params, headers):
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_stocks_load(params, headers):
|
||||
if params.get("provider") == "alpha_vantage":
|
||||
pytest.skip("Alpha Vantage is premium.")
|
||||
params = {p: v for p, v in params.items() if v}
|
||||
|
||||
query_str = get_querystring(params, [])
|
||||
|
||||
@@ -693,9 +693,9 @@ def test_stocks_options_chains(params, obb):
|
||||
"end_time": time(12, 0, 0),
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL",
|
||||
"start_date": "2023-01-01",
|
||||
"end_date": "2023-01-02",
|
||||
"interval": "1m",
|
||||
"start_date": "2023-06-01",
|
||||
"end_date": "2023-06-03",
|
||||
"interval": "1h",
|
||||
}
|
||||
),
|
||||
(
|
||||
@@ -719,7 +719,7 @@ def test_stocks_options_chains(params, obb):
|
||||
"provider": "polygon",
|
||||
"symbol": "AAPL",
|
||||
"start_date": "2023-01-01",
|
||||
"end_date": "2023-01-02",
|
||||
"end_date": "2023-01-03",
|
||||
"interval": "1m",
|
||||
}
|
||||
),
|
||||
@@ -744,9 +744,9 @@ def test_stocks_options_chains(params, obb):
|
||||
"ignore_tz": True,
|
||||
"provider": "yfinance",
|
||||
"symbol": "AAPL",
|
||||
"start_date": "2023-01-01",
|
||||
"end_date": "2023-01-02",
|
||||
"interval": "1m",
|
||||
"start_date": "2023-06-01",
|
||||
"end_date": "2023-06-03",
|
||||
"interval": "1h",
|
||||
}
|
||||
),
|
||||
(
|
||||
@@ -767,6 +767,9 @@ def test_stocks_options_chains(params, obb):
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_stocks_load(params, obb):
|
||||
if params.get("provider") == "alpha_vantage":
|
||||
pytest.skip("skipping alpha_vantage")
|
||||
|
||||
result = obb.stocks.load(**params)
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import List, Optional
|
||||
|
||||
|
||||
def update_lock_file(packages: Optional[List[str]] = None) -> None:
|
||||
"""Updates the poetry lock files in all the packages or in the given packages."""
|
||||
"""Update the poetry lock files in all the packages or in the given packages."""
|
||||
for path in Path.cwd().rglob("pyproject.toml"):
|
||||
if packages and path.parent.name not in packages:
|
||||
print(f"Skipping {path.parent.name}") # noqa: T201
|
||||
@@ -13,7 +13,7 @@ def update_lock_file(packages: Optional[List[str]] = None) -> None:
|
||||
|
||||
print(f"\nUpdating lock file in {path.parent.name}") # noqa: T201
|
||||
os.chdir(path.parent)
|
||||
os.system("poetry lock --no-update")
|
||||
os.system("poetry lock --no-update") # noqa: S605, S607
|
||||
|
||||
# Fix line endings and encoding
|
||||
lock_file = path.parent / "poetry.lock"
|
||||
|
||||
Reference in New Issue
Block a user