In which file did you encounter the issue?
developer-knowledge/conftest.py and developer-knowledge/search_document_chunks.py
Did you change the file? If so, how?
No.
Describe the issue
The Developer Knowledge samples include a fallback implementation for environments where the preview client is not installed. The fallback SearchDocumentChunksResponse stores its results but is not iterable, while the sample iterates over the response as a pager.
Reproduction command:
python -m pytest developer-knowledge -q
Result:
3 passed, 1 failed
...
developer-knowledge\\search_document_chunks.py:44: in search_document_chunks
for chunk in response:
TypeError: 'SearchDocumentChunksResponse' object is not iterable
Expected behavior: all four focused tests pass using the intended fallback. Actual behavior: the search test fails before it can exercise the sample.
Environment: Python 3.12, pytest 9.1.1, repository main at commit 430a87ada6f2d33f318b5d16b77464679905a140.
In which file did you encounter the issue?
developer-knowledge/conftest.pyanddeveloper-knowledge/search_document_chunks.pyDid you change the file? If so, how?
No.
Describe the issue
The Developer Knowledge samples include a fallback implementation for environments where the preview client is not installed. The fallback
SearchDocumentChunksResponsestores itsresultsbut is not iterable, while the sample iterates over the response as a pager.Reproduction command:
Result:
Expected behavior: all four focused tests pass using the intended fallback. Actual behavior: the search test fails before it can exercise the sample.
Environment: Python 3.12, pytest 9.1.1, repository
mainat commit430a87ada6f2d33f318b5d16b77464679905a140.