mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 16:21:50 +03:00
fix(cli): name roles through legacy launchers
This commit is contained in:
@@ -4,7 +4,9 @@ import os
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from nanobot.cli.commands import app
|
||||
from nanobot.cli.process_identity import named_executable, set_cli_process_identity
|
||||
|
||||
|
||||
@@ -44,6 +46,18 @@ def test_cli_process_identity_keeps_windows_launcher_name(
|
||||
assert titles == []
|
||||
|
||||
|
||||
def test_legacy_console_entrypoint_still_sets_subcommand_identity(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
commands: list[list[str]] = []
|
||||
monkeypatch.setattr("nanobot.cli.commands.set_cli_process_identity", commands.append)
|
||||
|
||||
result = CliRunner().invoke(app, ["webui", "--help"])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert commands == [["webui"]]
|
||||
|
||||
|
||||
def test_named_executable_creates_stable_role_symlink(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user