unsloth/unsloth_cli/tests
James Dawdy 3e6920627c
fix(studio): load run.py by path for editable installs (#5909)
* fix(studio): load run.py by path for editable installs

`studio update` can leave a partial site-packages/studio/backend/ tree
(plugin build artefacts only). That shadowed tree wins over an editable
install and breaks `from studio.backend.run import ...`. Loading run.py
by file path via importlib sidesteps the conflict.

The module is cached in _RUN_MODULE so repeated calls are cheap.
If exec_module fails, the module is removed from sys.modules before
re-raising so a subsequent retry starts clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Handle None __file__ when checking cached run module for PR #5909

* Harden _load_backend_auth_storage against None __file__ and resolve cache-key path (PR #5909)

* Adapt studio run/cloudflare in-venv tests to _load_run_module loader (PR #5909)

---------

Co-authored-by: Jim Dawdy <jimdawdy@Jims-MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
2026-06-12 00:11:05 -07:00
..
test_inference_chat.py Studio: add unsloth chat CLI command (#6170) 2026-06-11 16:09:34 +01:00
test_studio_cloudflare_flag.py fix(studio): load run.py by path for editable installs (#5909) 2026-06-12 00:11:05 -07:00
test_studio_run_parallel_flag.py fix(studio): load run.py by path for editable installs (#5909) 2026-06-12 00:11:05 -07:00
test_studio_run_short_alias_clashes.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00