Hotfix/int tests python fixture (#5504)

* fix command runner tests that were generating logs

* use the import behind a fixture

* updating the generator
This commit is contained in:
Henrique Joaquim
2023-10-02 14:43:27 +01:00
committed by GitHub
parent ad0bb2428b
commit d2471a9c4f
9 changed files with 140 additions and 64 deletions

View File

@@ -1,10 +1,19 @@
"""Test crypto extension."""
import pytest
from openbb import obb
from openbb_core.app.model.obbject import OBBject
@pytest.fixture(scope="session")
def obb(pytestconfig):
"""Fixture to setup obb."""
if pytestconfig.getoption("markexpr") != "not integration":
import openbb
return openbb.obb
@pytest.mark.parametrize(
"params",
[
@@ -82,7 +91,7 @@ from openbb_core.app.model.obbject import OBBject
],
)
@pytest.mark.integration
def test_crypto_load(params):
def test_crypto_load(params, obb):
result = obb.crypto.load(**params)
assert result
assert isinstance(result, OBBject)