File: test.py

package info (click to toggle)
beets 2.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,016 kB
  • sloc: python: 46,429; javascript: 8,018; xml: 334; sh: 261; makefile: 125
file content (19 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from beets import ui
from beets.plugins import BeetsPlugin


class TestPlugin(BeetsPlugin):
    def __init__(self):
        super().__init__()
        self.is_test_plugin = True

    def commands(self):
        test = ui.Subcommand("test")
        test.func = lambda *args: None

        # Used in CompletionTest
        test.parser.add_option("-o", "--option", dest="my_opt")

        plugin = ui.Subcommand("plugin")
        plugin.func = lambda *args: None
        return [test, plugin]