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

Function test_read_switches_from_environment

tests/debugpy/server/test_cli.py:216–224  ·  view source on GitHub ↗
(cli)

Source from the content-addressed store, hash-verified

214
215# Test that switches can be read from the environment
216def test_read_switches_from_environment(cli):
217 args = ["spam.py"]
218
219 with mock.patch.dict(os.environ, {"DEBUGPY_EXTRA_ARGV": "--connect 5678"}):
220 _, options = cli(args)
221
222 assert options["mode"] == "connect"
223 assert options["address"] == ("127.0.0.1", 5678)
224 assert options["target"] == "spam.py"
225
226# Test that command line switches override environment variables
227def test_override_environment_switch(cli):

Callers

nothing calls this directly

Calls 1

cliFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…