1、补充提交
This commit is contained in:
parent
6dfb79dcd2
commit
6e694224ef
@ -144,20 +144,3 @@ def test_prompt_history_creates_runtime_dir(tmp_path: Path, monkeypatch):
|
|||||||
assert callable(prompt)
|
assert callable(prompt)
|
||||||
assert (tmp_path / "runtime").is_dir()
|
assert (tmp_path / "runtime").is_dir()
|
||||||
|
|
||||||
|
|
||||||
def test_packaged_chat_uses_plain_input_by_default(monkeypatch):
|
|
||||||
monkeypatch.setattr("sys.frozen", True, raising=False)
|
|
||||||
monkeypatch.delenv("PAM_CHAT_PROMPT_TOOLKIT", raising=False)
|
|
||||||
monkeypatch.delenv("PAM_CHAT_SIMPLE_INPUT", raising=False)
|
|
||||||
|
|
||||||
prompt = _build_prompt_input(builtins.input)
|
|
||||||
|
|
||||||
assert prompt is builtins.input
|
|
||||||
|
|
||||||
|
|
||||||
def test_simple_input_env_disables_prompt_toolkit(monkeypatch):
|
|
||||||
monkeypatch.setenv("PAM_CHAT_SIMPLE_INPUT", "1")
|
|
||||||
|
|
||||||
prompt = _build_prompt_input(builtins.input)
|
|
||||||
|
|
||||||
assert prompt is builtins.input
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user