Skip to content

Stabilize basic tests by removing cwd-dependent indexing#10

Open
MisterGuy420 wants to merge 1 commit into
mainfrom
openclaw/fix-issue-9-1772418034888
Open

Stabilize basic tests by removing cwd-dependent indexing#10
MisterGuy420 wants to merge 1 commit into
mainfrom
openclaw/fix-issue-9-1772418034888

Conversation

@MisterGuy420

Copy link
Copy Markdown
Owner

Summary

This update fixes flaky behavior in the basic test suite by removing dependence on Path.cwd() and replacing it with isolated temporary codebases.

What changed

  • Updated tests/test_basic.py:
    • Replaced test_index_current_directory with test_index_codebase_in_temporary_directory.
    • Updated test_search_symbols to use a controlled temp directory fixture.
    • Added explicit symbol assertion for CodebaseIndexer in search results.

Why

The previous tests indexed/search the current working directory, which can vary by environment and cause inconsistent failures or slow runs. Using tmp_path makes tests deterministic, faster, and CI-friendly while preserving coverage of indexing and symbol search behavior.

Fixes #9

Generated by OpenClaw Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test

1 participant