mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-05-07 22:40:49 +08:00
* add support for Python 3.14 * escape % in argparse_translator in help strings * black * cli python version string * fix test param placeholder * fix integration_tests_testers * add 3.14 to ODP Desktop environment creation choices * partial lock update * update lock files * and the rest of the locks --------- Co-authored-by: deeleeramone <>
50 lines
1.2 KiB
Python
50 lines
1.2 KiB
Python
"""Nox sessions."""
|
|
|
|
from pathlib import Path
|
|
|
|
import nox
|
|
|
|
ROOT_DIR = Path(__file__).parent.parent.parent
|
|
PLATFORM_DIR = ROOT_DIR / "openbb_platform"
|
|
PLATFORM_TESTS = [str(PLATFORM_DIR / p) for p in ["tests", "core", "providers", "extensions"]]
|
|
CLI_DIR = ROOT_DIR / "cli"
|
|
CLI_TESTS = CLI_DIR / "tests"
|
|
|
|
|
|
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
|
|
def unit_test_platform(session):
|
|
"""Run the test suite."""
|
|
session.install("poetry")
|
|
session.run(
|
|
"python",
|
|
str(PLATFORM_DIR / "dev_install.py"),
|
|
"-e",
|
|
external=True,
|
|
)
|
|
session.install("pytest")
|
|
session.install("pytest-cov")
|
|
|
|
session.run(
|
|
"pytest",
|
|
*PLATFORM_TESTS,
|
|
f"--cov={PLATFORM_DIR}",
|
|
"-m",
|
|
"not integration",
|
|
)
|
|
|
|
|
|
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
|
|
def unit_test_cli(session):
|
|
"""Run the test suite."""
|
|
session.install("poetry")
|
|
session.run(
|
|
"python",
|
|
str(PLATFORM_DIR / "dev_install.py"),
|
|
"-e",
|
|
"--cli",
|
|
external=True,
|
|
)
|
|
session.install("pytest")
|
|
session.install("pytest-cov")
|
|
session.run("pytest", CLI_TESTS, f"--cov={CLI_DIR}")
|