Skip to content

Conversation

maxtheman
Copy link

@maxtheman maxtheman commented Aug 3, 2025

Description:

Adds comprehensive test suite for the create_deep_agent function in the deepagents library. The tests verify the core functionality of agent creation with various configurations

Changes:

  • Created tests/ directory with init.py for proper Python package structure

  • Added test_create_deep_agent.py with 7 test cases - 60% coverage

  • Added pytest configuration to pyproject.toml with test paths and discovery settings

  • Added dev dependencies (pytest>=8.0.0, pytest-cov>=6.0.0) as optional dependencies in pyproject.toml

  • Fixed license format in pyproject.toml from table to string to resolve setuptools deprecation warning

  • Added CLAUDE.md with test running instructions and current project status

  • Added Development section to README.md with testing and build instructions

    Dependencies:

    • pytest>=8.0.0 (dev dependency)
    • pytest-cov>=6.0.0 (dev dependency)

    Testing:

    • Verified all 7 tests pass successfully
    • Tested that package builds successfully without warnings
    • Verified built wheel can be installed and imported correctly
    • Confirmed test instructions in README work as documented
platform darwin -- Python 3.11.13, pytest-8.4.1, pluggy-1.6.0 -- /Users/max/Documents/deepagents/venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/max/Documents/deepagents
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.9.0, langsmith-0.4.10, cov-6.2.1
collected 7 items

tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_happy_path PASSED                                                                                       [ 14%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_with_subagents PASSED                                                                                   [ 28%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_with_custom_model PASSED                                                                                [ 42%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_with_custom_state_schema PASSED                                                                         [ 57%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_with_multiple_tools PASSED                                                                              [ 71%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_empty_tools PASSED                                                                                      [ 85%]
tests/test_create_deep_agent.py::TestCreateDeepAgent::test_create_deep_agent_complex_scenario PASSED                                                                                 [100%]

====================================================================================== tests coverage ======================================================================================
____________________________________________________________________ coverage: platform darwin, python 3.11.13-final-0 _____________________________________________________________________

Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
venv/lib/python3.11/site-packages/deepagents/__init__.py        3      0   100%
venv/lib/python3.11/site-packages/deepagents/graph.py          20      0   100%
venv/lib/python3.11/site-packages/deepagents/model.py           3      1    67%
venv/lib/python3.11/site-packages/deepagents/prompts.py         5      0   100%
venv/lib/python3.11/site-packages/deepagents/state.py          16      5    69%
venv/lib/python3.11/site-packages/deepagents/sub_agent.py      37      7    81%
venv/lib/python3.11/site-packages/deepagents/tools.py          59     44    25%
-------------------------------------------------------------------------------
TOTAL                                                         143     57    60%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant