(self)
| 99 | assert c.call(["one", "two", "three"]) == ["two", "three"] |
| 100 | |
| 101 | def test_call(self): |
| 102 | with taddons.context() as tctx: |
| 103 | cm = command.CommandManager(tctx.master) |
| 104 | a = TAddon() |
| 105 | c = command.Command(cm, "cmd.path", a.cmd1) |
| 106 | assert c.call(["foo"]) == "ret foo" |
| 107 | assert c.signature_help() == "cmd.path foo -> str" |
| 108 | |
| 109 | c = command.Command(cm, "cmd.two", a.cmd2) |
| 110 | with pytest.raises(exceptions.CommandError): |
| 111 | c.call(["foo"]) |
| 112 | |
| 113 | c = command.Command(cm, "cmd.three", a.cmd3) |
| 114 | assert c.call(["1"]) == 1 |
| 115 | |
| 116 | def test_parse_partial(self): |
| 117 | tests = [ |
nothing calls this directly
no test coverage detected