From ebee9620201ad9609e8b6d6a5322672d4bd52479 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 8 May 2011 01:38:04 +0200 Subject: [PATCH] Test that --help returns the options we expect it to --- tests/help_test.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/help_test.py diff --git a/tests/help_test.py b/tests/help_test.py new file mode 100644 index 00000000..a64877c6 --- /dev/null +++ b/tests/help_test.py @@ -0,0 +1,19 @@ +import os +import subprocess +import sys +import unittest + +import mopidy + +class HelpTest(unittest.TestCase): + def test_help_has_mopidy_options(self): + mopidy_dir = os.path.dirname(mopidy.__file__) + args = [sys.executable, mopidy_dir, '--help'] + process = subprocess.Popen(args, stdout=subprocess.PIPE) + output = process.communicate()[0] + self.assert_('--version' in output) + self.assert_('--help' in output) + self.assert_('--quiet' in output) + self.assert_('--verbose' in output) + self.assert_('--save-debug-log' in output) + self.assert_('--list-settings' in output)