MCPcopy Create free account
hub / github.com/microsoft/debugpy / test_log_dir_env

Function test_log_dir_env

tests/debugpy/test_log.py:56–76  ·  view source on GitHub ↗
(pyfile, tmpdir, run, target)

Source from the content-addressed store, hash-verified

54@pytest.mark.parametrize("run", runners.all)
55@pytest.mark.parametrize("target", targets.all)
56def test_log_dir_env(pyfile, tmpdir, run, target):
57 @pyfile
58 def code_to_debug():
59 import debuggee
60 from debuggee import backchannel
61
62 debuggee.setup()
63 assert backchannel.receive() == "proceed"
64
65 with check_logs(tmpdir, run):
66 with debug.Session() as session:
67 session.log_dir = None
68 session.spawn_adapter.env["DEBUGPY_LOG_DIR"] = tmpdir.strpath
69 if run.request != "launch":
70 session.spawn_debuggee.env["DEBUGPY_LOG_DIR"] = tmpdir.strpath
71
72 backchannel = session.open_backchannel()
73 with run(session, target(code_to_debug)):
74 pass
75
76 backchannel.send("proceed")

Callers

nothing calls this directly

Calls 5

check_logsFunction · 0.85
open_backchannelMethod · 0.80
runFunction · 0.70
targetFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…