mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-08 18:32:21 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user