MCPcopy Create free account
hub / github.com/pyinvoke/invoke / echo_hides_extra_sudo_flags

Method echo_hides_extra_sudo_flags

tests/context.py:331–339  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

329 @trap
330 @mock_subprocess()
331 def echo_hides_extra_sudo_flags(self):
332 skip() # see TODO in sudo() re: clean output display
333 config = Config(overrides={"runner": _Dummy})
334 Context(config=config).sudo("nope", echo=True)
335 output = sys.stdout.getvalue()
336 sys.__stderr__.write(repr(output) + "\n")
337 assert "-S" not in output
338 assert Context().sudo.prompt not in output
339 assert "sudo nope" in output
340
341 @patch(local_path)
342 def honors_config_for_prompt_value(self, Local):

Callers

nothing calls this directly

Calls 4

ConfigClass · 0.90
ContextClass · 0.90
reprClass · 0.85
sudoMethod · 0.45

Tested by

no test coverage detected