fix(tests): isolate test suite from global skillware config (#302) - #311
fix(tests): isolate test suite from global skillware config (#302)#311tusharjamunkar wants to merge 1 commit into
Conversation
|
Hey @tusharjamunkar thanks a lot for this, but as per contributing guide, and ai native workflow, please try to claim issues by commenting on them before opening a PR to avoid dublicates and excessive PR reviews. Let me know if you'd like to pick another issue for now. Again, the easiest path woudl be to comment on the issue and claim it first. <3 |
|
Hi @rosspeili, thanks so much for the helpful heads-up and guidance! Understood completely — I will make sure to comment on issues to claim them first going forward as outlined in the contributing guidelines. Since this fix is already implemented and verified with tests, please feel free to review/merge if convenient, or let me know if you'd prefer I close it and claim another issue first. Thanks again! |
|
Also @rosspeili, if there is a specific open issue currently unclaimed / not being worked on that you recommend I tackle next, please feel free to point me towards it so I can comment and claim it. Happy to help! |
|
Hey @tusharjamunkar no worries at all, and appreciate the understanding. I would wait for the contributor who claimed #302 to open a PR, and if they stale or drop it, I will consider your PR, so do not close for now unless you wanna withdraw it. On top of that, there are a bunch of open issues, including good first issues. If you're specifically looking to work on tests, or config files, look for labels |
|
Thanks so much @rosspeili for the warm welcome and guidance! I'll leave this PR open as suggested. Following your recommendation to check out testing issues, I'd love to take on #237 ([Feat]: CI smoke tests for local-execute examples). I will comment on that issue to claim it before getting started. Thanks again! |
Description
Fixes #302.
Root Cause
When an operator initializes or configures Skillware locally (e.g., running
skillware mail signature init), a globalconfig.yamlis written to the user's config directory. When this file exists,get_skill_roots()switches to configured mode (project->external->bundled), causing tests that verify legacy resolution order (test_get_skill_roots_order_env_project_bundledandtest_resolve_skill_prefers_env_over_cwd) to fail on developer machines.Solution
autouse=Truefixtureisolate_skillware_configintests/conftest.pythat pointsSKILLWARE_CONFIG_DIR(GLOBAL_CONFIG_DIR_ENV) to an isolated temporary directory for every test and clears the configuration cache before and after test execution.GLOBAL_CONFIG_DIR_ENVor provide their own config files without conflict.Verification
config.yaml: bothtest_get_skill_roots_order_env_project_bundledandtest_resolve_skill_prefers_env_over_cwdpass.flake8 tests/conftest.pypassed cleanly.