diff --git a/mopidy/utils/command.py b/mopidy/utils/command.py index 7c6e874b..d8b5bbf6 100644 --- a/mopidy/utils/command.py +++ b/mopidy/utils/command.py @@ -127,3 +127,6 @@ class Command(object): return self._children[child]._parse( result._args, result, defaults, ' '.join([prog, child])) + + def run(self, *args, **kwargs): + raise NotImplementedError diff --git a/tests/utils/command_test.py b/tests/utils/command_test.py index 016de37f..7c2e3112 100644 --- a/tests/utils/command_test.py +++ b/tests/utils/command_test.py @@ -434,3 +434,9 @@ class CommandErrorTest(unittest.TestCase): def test_str_command_error(self): error = command.CommandError('message', usage='usage: foo') self.assertEqual(str(error), 'usage: foo\n\nerror: message\n') + + +class RunTest(unittest.TestCase): + def test_default_implmentation_raises_error(self): + with self.assertRaises(NotImplementedError): + command.Command().run()