(cli)
| 214 | |
| 215 | # Test that switches can be read from the environment |
| 216 | def 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 |
| 227 | def test_override_environment_switch(cli): |
nothing calls this directly
no test coverage detected
searching dependent graphs…