mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
Introduce integration test modularity (#5865)
* Introduce integration test modularity * Fix Python 3.9 error * Add TODO * Update generators * Handle endpoints that only feature one provider that is not installed * Fix failing unit test
This commit is contained in:
@@ -3,6 +3,7 @@ import random
|
||||
from typing import Literal
|
||||
|
||||
import pytest
|
||||
from extensions.tests.conftest import parametrize
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ def get_data(menu: Literal["stocks", "crypto"]):
|
||||
return funcs[menu]()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -95,7 +96,7 @@ def test_technical_atr(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -133,7 +134,7 @@ def test_technical_fib(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "offset": ""}, "stocks"),
|
||||
@@ -151,7 +152,7 @@ def test_technical_obv(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "length": "", "signal": ""}, "stocks"),
|
||||
@@ -169,7 +170,7 @@ def test_technical_fisher(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -205,7 +206,7 @@ def test_technical_adosc(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -245,7 +246,7 @@ def test_technical_bbands(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -281,7 +282,7 @@ def test_technical_zlma(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "length": "", "scalar": ""}, "stocks"),
|
||||
@@ -307,7 +308,7 @@ def test_technical_aroon(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -343,7 +344,7 @@ def test_technical_sma(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -381,7 +382,7 @@ def test_technical_demark(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "anchor": "", "offset": ""}, "stocks"),
|
||||
@@ -399,7 +400,7 @@ def test_technical_vwap(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -437,7 +438,7 @@ def test_technical_macd(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -473,7 +474,7 @@ def test_technical_hma(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -509,7 +510,7 @@ def test_technical_donchian(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -549,7 +550,7 @@ def test_technical_ichimoku(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "target": "", "period": ""}, "stocks"),
|
||||
@@ -575,7 +576,7 @@ def test_technical_clenow(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -611,7 +612,7 @@ def test_technical_adx(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "offset": ""}, "stocks"),
|
||||
@@ -629,7 +630,7 @@ def test_technical_ad(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -665,7 +666,7 @@ def test_technical_wma(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "length": "", "scalar": ""}, "stocks"),
|
||||
@@ -691,7 +692,7 @@ def test_technical_cci(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -729,7 +730,7 @@ def test_technical_rsi(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -765,7 +766,7 @@ def test_technical_stoch(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -803,7 +804,7 @@ def test_technical_kc(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
({"data": "", "index": "", "length": ""}, "stocks"),
|
||||
@@ -821,7 +822,7 @@ def test_technical_cg(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
@@ -861,7 +862,7 @@ def test_technical_cones(params, data_type, obb):
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@parametrize(
|
||||
"params, data_type",
|
||||
[
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user