MCPcopy
hub / github.com/pallets/click / test_editor_env_passed_through

Function test_editor_env_passed_through

tests/test_termui.py:550–557  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548
549
550def test_editor_env_passed_through():
551 with patch("subprocess.Popen") as mock_popen:
552 mock_popen.return_value.wait.return_value = 0
553 Editor(editor="vi", env={"MY_VAR": "1"}).edit_files(["f.txt"])
554
555 env = mock_popen.call_args[1].get("env")
556 assert env is not None
557 assert env["MY_VAR"] == "1"
558
559
560def test_editor_failure_exception():

Callers

nothing calls this directly

Calls 2

EditorClass · 0.90
edit_filesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…