diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea69d01d0..47768d66f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,7 +28,9 @@ jobs: run: uv python install ${{ matrix.python-version }} - name: Install the project - run: uv sync --dev --all-extras + run: | + uv sync --dev --all-extras + uv pip uninstall pytest-vcr --quiet || true - name: Run tests run: uv run pytest --block-network --timeout=60 -vv diff --git a/pyproject.toml b/pyproject.toml index 037d04c23..aadab881a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,9 @@ dev-dependencies = [ "pytest-randomly>=3.16.0", "pytest-timeout>=2.3.1", ] +constraint-dependencies = [ + "pytest-vcr; python_version>='0'", +] [project.scripts] crewai = "crewai.cli.cli:crewai" @@ -122,6 +125,17 @@ torchvision = [ { index = "pytorch", marker = "python_version < '3.13'" }, ] + +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = "test_*.py" +python_classes = "Test*" +python_functions = "test_*" +addopts = "--strict-markers --disable-warnings --tb=short" +markers = [ + "vcr: marks tests as using VCR.py for HTTP request recording", +] + [build-system] requires = ["hatchling"] build-backend = "hatchling.build"