mopidy/tests/help_test.py
Stein Magnus Jodal 1a02b4d17f Remove support for running Python on the mopidy/ dir
It doesn't make sense to run Mopidy without extensions registered, thus you'll
need to use setuptools and to run `python setup.py develop` anyway. Doing so
makes running `mopidy` from anywhere in the development virtualenv work,
removing any need for running `python mopidy/`.
2013-09-16 22:13:36 +02:00

28 lines
844 B
Python

from __future__ import unicode_literals
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,
env={'PYTHONPATH': os.path.join(mopidy_dir, '..')},
stdout=subprocess.PIPE)
output = process.communicate()[0]
self.assertIn('--version', output)
self.assertIn('--help', output)
self.assertIn('--quiet', output)
self.assertIn('--verbose', output)
self.assertIn('--save-debug-log', output)
self.assertIn('--show-config', output)
self.assertIn('--config', output)
self.assertIn('--option', output)