[PR #20] [CLOSED] Added tests and test suite - about 60% coverage #407

Closed
opened 2026-02-16 09:15:54 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/20
Author: @maxtheman
Created: 8/3/2025
Status: Closed

Base: masterHead: test/add-happy-path-test


📝 Commits (1)

  • 171bf9d Added tests - about 60% coverage

📊 Changes

5 files changed (+306 additions, -1 deletions)

View changed files

CLAUDE.md (+79 -0)
📝 README.md (+52 -0)
📝 pyproject.toml (+14 -1)
tests/__init__.py (+0 -0)
tests/test_create_deep_agent.py (+161 -0)

📄 Description

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%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagents/pull/20 **Author:** [@maxtheman](https://github.com/maxtheman) **Created:** 8/3/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `test/add-happy-path-test` --- ### 📝 Commits (1) - [`171bf9d`](https://github.com/langchain-ai/deepagents/commit/171bf9deec5ccf51faeb07ed2d27756eb1550192) Added tests - about 60% coverage ### 📊 Changes **5 files changed** (+306 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `CLAUDE.md` (+79 -0) 📝 `README.md` (+52 -0) 📝 `pyproject.toml` (+14 -1) ➕ `tests/__init__.py` (+0 -0) ➕ `tests/test_create_deep_agent.py` (+161 -0) </details> ### 📄 Description 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% ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:15:54 -05:00
yindo closed this issue 2026-02-16 09:15:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#407