test/rsrc/beetsplug/test.py
raw| 1 | from beets import ui |
| 2 | from beets.plugins import BeetsPlugin |
| 3 | |
| 4 | |
| 5 | class TestPlugin(BeetsPlugin): |
| 6 | def __init__(self): |
| 7 | super().__init__() |
| 8 | self.is_test_plugin = True |
| 9 | |
| 10 | def commands(self): |
| 11 | test = ui.Subcommand("test") |
| 12 | test.func = lambda *args: None |
| 13 | |
| 14 | # Used in CompletionTest |
| 15 | test.parser.add_option("-o", "--option", dest="my_opt") |
| 16 | |
| 17 | plugin = ui.Subcommand("plugin") |
| 18 | plugin.func = lambda *args: None |
| 19 | return [test, plugin] |