Check if outdated (#5898)

This commit is contained in:
Igor Radovanovic
2023-12-18 11:24:02 +01:00
committed by GitHub
parent 238ab39a50
commit ecdb111fd5
4 changed files with 50 additions and 44 deletions

View File

@@ -1,17 +1,20 @@
"""Test the integration tests."""
from typing import Literal
from openbb_core.app.charting_service import ChartingService
from extensions.tests.utils.integration_tests_testers import (
check_missing_integration_test_params,
check_missing_integration_test_providers,
check_missing_integration_tests,
check_outdated_integration_tests,
check_wrong_integration_test_params,
get_integration_tests,
get_module_functions,
)
def run_test(test_type: str, check_function) -> None:
def run_test(test_type: Literal["api", "python"], check_function) -> None:
"""Run tests helper function."""
integration_tests = get_integration_tests(test_type=test_type)
functions = get_module_functions(integration_tests)
@@ -58,3 +61,9 @@ def test_missing_api_integration_tests() -> None:
"""Check if there are missing tests."""
missing = check_missing_integration_tests(test_type="python")
assert not missing, "\n".join(missing)
def test_outdated_api_integration_tests() -> None:
"""Check if there are outdated tests."""
outdated = check_outdated_integration_tests(test_type="python")
assert not outdated, "\n".join(outdated)