diff --git a/mopidy/__main__.py b/mopidy/__main__.py index 0118395c..a55059a4 100644 --- a/mopidy/__main__.py +++ b/mopidy/__main__.py @@ -17,12 +17,6 @@ mopidy_args = sys.argv[1:] sys.argv[1:] = [] -# Add ../ to the path so we can run Mopidy from a Git checkout without -# installing it on the system. -sys.path.insert( - 0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))) - - from mopidy import commands, ext from mopidy.audio import Audio from mopidy import config as config_lib diff --git a/tests/help_test.py b/tests/help_test.py index 4f210031..574e4fd7 100644 --- a/tests/help_test.py +++ b/tests/help_test.py @@ -12,7 +12,10 @@ 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) + 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)