aws-samples / aws-samples/sample-agentic-platform

bug: ``make test` aborts during collection: orphaned tests for deleted `diy_agent` and `pydanticai_agent`

Open Beginner friendly
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133
Forks
54
PR merge metrics
No merged PRs in 30d

Description

## Summary

`make test` cannot run on a clean checkout of `main`. Four test modules import agent packages that were deleted from `src/`, so pytest aborts during collection and the remaining 149 tests never execute.

## Version

- Commit: `e41eca1` (`main`, 2026-06-17)
- Python 3.12.8, pytest 8.3.5, macOS arm64
- No local modifications

## Reproduction

```bash
git clone https://github.com/aws-samples/sample-agentic-platform.git
cd sample-agentic-platform
make install
make test
```

## Actual result

```text
collected 163 items / 4 errors

ERROR tests/unit/agent/diy_agent/test_diy_agent.py
ERROR tests/unit/agent/diy_agent/test_diy_agent_controller.py
ERROR tests/unit/agent/pydanticai_agent/test_pyai_agent.py
ERROR tests/unit/agent/pydanticai_agent/test_pyai_agent_controller.py

E ModuleNotFoundError: No module named 'agentic_platform.agent.diy_agent'
E ModuleNotFoundError: No module named 'agentic_platform.agent.pydanticai_agent'

!!!! Interrupted: 4 errors during collection !!!!
make: *** [test] Error 2
```

## Cause

Commit `75ba436 ` (Feat: Built an agentic chat agent that can be used as the interface to our frontend (separate push) deleted these source packages:

- `src/agentic_platform/agent/diy_agent/`
- `src/agentic_platform/agent/pydanticai_agent/`

Their test directories were left in place:

- `tests/unit/agent/diy_agent/`
- `tests/unit/agent/pydanticai_agent/`

`src/agentic_platform/agent/` now contains only `agentic_chat`, `agentic_rag`, `coding_agent`, `jira_agent`, `langgraph_chat`, and `strands_glue_athena`. The orphaned tests reference implementations that no longer exist and cannot pass in any configuration.

Because these are collection errors rather than test failures, pytest exits before running anything, so the failure is not contained to the affected modules.

## Suggested fix

Delete both orphaned test directories. Excluding them locally yields `4 failed, 145 passed`; the 4 remaining failures are a separate concern, filed as its own issue.

## Impact

Contributors have no green baseline to validate changes against, and `make test` is listed in `AGENTS.md` as the expected check after code changes.

Contributor guide

Open the contributing guide

Research direction

Start with tests/unit/agent/diy_agent/ and tests/unit/agent/pydanticai_agent/, then run make test on a clean checkout. Remove the two test directories for the deleted agent packages and confirm pytest completes collection; the four unrelated test failures noted in the issue are separate work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.