test(cli): repair stale bin.* imports and cover passthrough/--list

Tests still imported and patched the old bin.* package (renamed to
myclaude.* earlier), breaking collection. Point them at myclaude.* and
add coverage for the new claude-flag passthrough and --list session
listing.
This commit is contained in:
Zhengshou Lai
2026-06-27 21:44:14 +08:00
parent 54c60eb463
commit 1db0187b70
2 changed files with 61 additions and 10 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import os
from pathlib import Path
from unittest.mock import patch
from bin.project_root import get_myclaude_project_root, get_workspace_root
from myclaude.project_root import get_myclaude_project_root, get_workspace_root
class TestGetMyclaudeProjectRoot:
@@ -44,7 +44,7 @@ class TestGetMyclaudeProjectRoot:
patch.dict(os.environ, {}, clear=True),
patch("pathlib.Path.cwd", side_effect=OSError),
patch(
"bin.project_root._pyproject_names_myclaude",
"myclaude.project_root._pyproject_names_myclaude",
return_value=False,
),
):
@@ -95,7 +95,7 @@ class TestGetWorkspaceRoot:
with (
patch.dict(os.environ, {}, clear=True),
patch(
"bin.project_root.get_myclaude_project_root",
"myclaude.project_root.get_myclaude_project_root",
return_value=tmp_path / ".myclaude",
),
patch("pathlib.Path.home", return_value=home),