()
| 60 | |
| 61 | |
| 62 | def test_remove(): |
| 63 | with taddons.context() as tctx: |
| 64 | km = keymap.Keymap(tctx.master) |
| 65 | km.add("key", "str", ["options", "commands"], "help1") |
| 66 | assert len(km.bindings) == 1 |
| 67 | assert "options" in km.bindings[0].contexts |
| 68 | |
| 69 | km.remove("key", ["options"]) |
| 70 | assert len(km.bindings) == 1 |
| 71 | assert "options" not in km.bindings[0].contexts |
| 72 | |
| 73 | km.remove("key", ["commands"]) |
| 74 | assert len(km.bindings) == 0 |
| 75 | |
| 76 | |
| 77 | def test_load_path(tmpdir): |