| 42 | assert hasattr(c, attr) and callable(getattr(c, attr)) |
| 43 | |
| 44 | class run: |
| 45 | # NOTE: actual behavior of command running is tested in runners.py |
| 46 | def exists(self): |
| 47 | self._expect_attr("run") |
| 48 | |
| 49 | @patch(local_path) |
| 50 | def defaults_to_Local(self, Local): |
| 51 | c = Context() |
| 52 | c.run("foo") |
| 53 | assert Local.mock_calls == [call(c), call().run("foo")] |
| 54 | |
| 55 | def honors_runner_config_setting(self): |
| 56 | runner_class = Mock() |
| 57 | config = Config({"runners": {"local": runner_class}}) |
| 58 | c = Context(config) |
| 59 | c.run("foo") |
| 60 | assert runner_class.mock_calls == [call(c), call().run("foo")] |
| 61 | |
| 62 | def sudo(self): |
| 63 | self._expect_attr("sudo") |
nothing calls this directly
no outgoing calls
no test coverage detected