Skip to content

fix: isolate discovery tests from merged global config (isolate pytest from config.yaml) - #312

Open
TrueFurina wants to merge 2 commits into
ARPAHLS:mainfrom
TrueFurina:fix/isolate-discovery-tests-from-global-config
Open

fix: isolate discovery tests from merged global config (isolate pytest from config.yaml)#312
TrueFurina wants to merge 2 commits into
ARPAHLS:mainfrom
TrueFurina:fix/isolate-discovery-tests-from-global-config

Conversation

@TrueFurina

Copy link
Copy Markdown

Summary

Fixes the two framework tests that fail with 458 pass / 2 fail after an operator runs skillware mail signature init (which writes a user-level config.yaml). Since #246, when global config exists, discovery uses the configured resolution order (project → external → bundled), which contradicts the legacy-mode assertions in:

  • tests/test_discovery.py::test_get_skill_roots_order_env_project_bundled
  • tests/test_loader.py::test_resolve_skill_prefers_env_over_cwd

Fix

Both tests now set SKILLWARE_CONFIG_DIR to an empty temp directory via monkeypatch, isolating the test run from any operator-level global config.yaml. The legacy-order assertions then hold deterministically regardless of the developer's machine state. CI stays green on clean homes; local runs after mail signature init are now green too.

Changes

  • tests/test_discovery.py: added monkeypatch.setenv("SKILLWARE_CONFIG_DIR", ...) isolation
  • tests/test_loader.py: same isolation

Acceptance criteria

  • python -m pytest tests/test_discovery.py::test_get_skill_roots_order_env_project_bundled tests/test_loader.py::test_resolve_skill_prefers_env_over_cwd -q passes even with a global config.yaml present
  • Test isolation only; no runtime behavior change

@rosspeili

Copy link
Copy Markdown
Contributor

Welcome to Skillware, @TrueFurina, and thanks for taking the time on this.

We can’t merge #312 as it stands, as this work overlaps an issue that’s already claimed and in progress with another contributor, and we’ve asked folks (especially on first contributions) to comment on the issue and claim it before opening a PR. That keeps duplicate work and review churn down.

A few other things that would help next time: please skim CONTRIBUTING.md and ai_native_workflow.md before you start, they cover complementary docs, tests, and ripple effects that are easy to miss otherwise.

No hard feelings at all. If you’d like to stay involved, pick an unclaimed open issue, say you’re working on it in a comment, and we’ll go from there. Happy to suggest a few good first ones if that helps. <3

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.

2 participants