test: add new tests for run_ingest_query directory processing and clone_repo async timeout #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces two new tests to improve coverage for critical functionality in our ingestion and cloning logic:
test_run_ingest_queryrun_ingest_querycorrectly processes directories, generates the proper summary, and includes file contents in the expected structure.test_clone_repo_with_timeoutclone_repofunction raises anAsyncTimeoutErrorif the cloning process exceeds the specified time limit (viaasync_timeout).Details
test_run_ingest_query:temp_directoryand asample_queryfixture to set up a mock repository structure.run_ingest_queryand asserts that the summary and content match the known directory structure.test_clone_repo_with_timeout:_run_git_commandfunction to force anasyncio.TimeoutError.AsyncTimeoutErrorfrom ourasync_timeoutdecorator, confirming correct timeout handling.Rationale
Notes
test_query_ingestion.pyandtest_repository_clone.py.Please review and let me know if further adjustments or refinements are needed!