diff --git a/lib/cli/tests/test_entrypoint_consistency.py b/lib/cli/tests/test_entrypoint_consistency.py index 081fcca34..ad143be69 100644 --- a/lib/cli/tests/test_entrypoint_consistency.py +++ b/lib/cli/tests/test_entrypoint_consistency.py @@ -8,10 +8,15 @@ via `uv tool install` exposes the `crewai` executable. from __future__ import annotations +import sys from pathlib import Path import pytest -import tomllib + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib LIB_DIR = Path(__file__).resolve().parents[2] diff --git a/lib/crewai/tests/cli/test_entrypoint.py b/lib/crewai/tests/cli/test_entrypoint.py index 1575a68b5..52ae0f141 100644 --- a/lib/crewai/tests/cli/test_entrypoint.py +++ b/lib/crewai/tests/cli/test_entrypoint.py @@ -8,11 +8,16 @@ any [project.scripts], so uv could not find an executable to expose. from __future__ import annotations import importlib +import sys from pathlib import Path import click import pytest -import tomllib + +if sys.version_info >= (3, 11): + import tomllib +else: + import tomli as tomllib CREWAI_PYPROJECT = (