Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

test(py): preserve isolated Autogen regression coverage

jkomyno78fb09efdf16
diff --git a/.agents/skills/python-testing/references/nox-make.md b/.agents/skills/python-testing/references/nox-make.md
index dfeb7ca56..130dd7dd6 100644
--- a/.agents/skills/python-testing/references/nox-make.md
+++ b/.agents/skills/python-testing/references/nox-make.md
@@ -31,6 +31,7 @@ Current sessions include:
- `fix`: Ruff automatic fixes.
- `type_inference`: provider return-type inference checks.
- `tst`: pytest test suite.
+- `tst_autogen`: Autogen regressions in an isolated protobuf-compatible environment.
- `snt`: sanity tests.
When adding or renaming provider packages, inspect the `type_inference` session's explicit provider install list and checked test-file list.
diff --git a/.github/workflows/py.test.yml b/.github/workflows/py.test.yml
index f6eacc96a..4c3b114ca 100644
--- a/.github/workflows/py.test.yml
+++ b/.github/workflows/py.test.yml
@@ -104,8 +104,12 @@ jobs:
# its own environment instead of constructing an invalid combination.
uv venv autogen-env --python ${{ matrix.python-version }}
source autogen-env/bin/activate
- uv pip install -e . -e providers/autogen
+ uv pip install -e . -e providers/autogen pytest pytest-mock
python -c "import composio_autogen; print('✓ Autogen provider import successful')"
+ python -m pytest \
+ tests/test_provider.py::TestAgenticSkipDefaultsParity::test_autogen_signature_honors_skip_defaults \
+ tests/test_provider.py::TestAgenticSkipDefaultsParity::test_autogen_signature_preserves_default \
+ -v --tb=short
- name: Run Unit Tests
run: |
diff --git a/python/noxfile.py b/python/noxfile.py
index eae782dcd..2e5b18ae6 100644
--- a/python/noxfile.py
+++ b/python/noxfile.py
@@ -111,6 +111,20 @@ def tst(session: Session):
session.run("pytest", *test_paths, "-v", "--tb=short")
+def tst_autogen(session: Session):
+ """Run Autogen tests in its protobuf-compatible environment."""
+ session.install(".", "--group", "dev")
+ session.install("./providers/autogen")
+ session.run(
+ "pytest",
+ "tests/test_provider.py::TestAgenticSkipDefaultsParity::test_autogen_signature_honors_skip_defaults",
+ "tests/test_provider.py::TestAgenticSkipDefaultsParity::test_autogen_signature_preserves_default",
+ "-v",
+ "--tb=short",
+ )
+
+
@nox.session
def snt(session: Session):
"""Run fast sanity tests for imports and SDK initialization."""
diff --git a/python/tests/test_provider.py b/python/tests/test_provider.py
index a4756b8b9..108211a70 100644
--- a/python/tests/test_provider.py
+++ b/python/tests/test_provider.py
@@ -1327,8 +1327,10 @@ class TestAgenticSkipDefaultsParity:
mismatch, but its signature likewise ignored skip_defaults; it is aligned
too and checked on the signature alone.
- Provider packages are optional (the unit-test job installs langchain and
- autogen), so each case skips via importorskip when its provider is absent.
+ Provider packages are optional. The shared unit-test job installs langchain
+ and langgraph, while Autogen runs separately because their protobuf
+ requirements conflict. Each case skips via importorskip when its provider
+ is absent.
"""
def _make_tool_with_default(self):