Files
crewAI/tests/test_compatibility.py
Devin AI bee9307c08 ci: Add Python 3.10, 3.11 to test matrix
feat: Add basic import compatibility test

Adds Python 3.10 and 3.11 to the GitHub Actions test matrix to ensure
compatibility across the supported Python range (>=3.10, <3.13).

Also adds a simple test_compatibility.py to catch basic import errors
early, preventing regressions like the one reported in #2575 where
 caused issues on Python 3.10.

Co-Authored-By: Joe Moura <joao@crewai.com>
2025-04-10 16:24:12 +00:00

15 lines
493 B
Python

import pytest
def test_basic_import():
"""
Tests that the crewai package can be imported without raising exceptions.
This helps catch basic installation and dependency issues, including import
errors related to Python version compatibility.
"""
try:
import crewai
except ImportError as e:
pytest.fail(f"Failed to import crewai package: {e}")
except Exception as e:
pytest.fail(f"An unexpected error occurred during crewai import: {e}")