Skip to content

Commit edb7a99

Browse files
danielmillerpclaude
andcommitted
Use local SDK wheel for tutorial tests when --build-cli is set
The test runner was using the published SDK for pytest even when --build-cli was set, meaning source fixes weren't reflected in tests. Now uses --with to overlay the local wheel for both the agent process and the test runner. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b7f1c66 commit edb7a99

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

examples/tutorials/run_agent_test.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,16 @@ run_test() {
270270
fi
271271

272272
# Stream pytest output directly in real-time
273-
uv run pytest tests/test_agent.py -v -s
273+
if [ "$BUILD_CLI" = true ]; then
274+
local wheel_file=$(ls /home/runner/work/*/*/dist/agentex_sdk-*.whl 2>/dev/null | head -n1)
275+
if [[ -n "$wheel_file" ]]; then
276+
uv run --with "$wheel_file" pytest tests/test_agent.py -v -s
277+
else
278+
uv run pytest tests/test_agent.py -v -s
279+
fi
280+
else
281+
uv run pytest tests/test_agent.py -v -s
282+
fi
274283
exit_code=$?
275284

276285
if [ $exit_code -eq 0 ]; then

0 commit comments

Comments
 (0)