Skip to content

test: isolate temporary skill registry state - #1

Open
AlanAAG wants to merge 1 commit into
ai-for-edu:mainfrom
AlanAAG:fix/skill-registry-isolation
Open

AlanAAG wants to merge 1 commit into
ai-for-edu:mainfrom
AlanAAG:fix/skill-registry-isolation

Conversation

@AlanAAG

@AlanAAG AlanAAG commented Sep 8, 2026

Copy link
Copy Markdown

Summary

test_load_from_tmp_dir calls load_skills(tmp_path), which intentionally
replaces the module-level skill registry. The temporary registry then leaks
into later tests, leaving the default feynman skill unavailable and causing
two order-dependent failures in test_skills_default.py.

This change uses pytest's monkeypatch fixture to restore the registry after
the temporary-directory test. Production behavior is unchanged.

Verification

  • uv run pytest -q tests/test_skills.py tests/test_skills_default.py
    • 33 passed
  • uv run pytest -q
    • 6 failed, 545 passed, 23 skipped

The six remaining failures are pre-existing feature specifications in
tests/test_product_memory.py.

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.

1 participant