Description: Use Debian's ycmd package locations for ycmd in tests
 We neither have the third_party directory for vim-youcompleteme nor
 for ycmd, so we can't import them and we don't want to either.
 .
 The two python tests are removed as we have always Python installed
 in Debian due to dependencies and the tests can for some reason not
 override this properly.
Author: David Kalnischkies <donkult@debian.org>
Forwarded: not-needed

--- a/run_tests.py
+++ b/run_tests.py
@@ -8,29 +8,6 @@
 import sys
 
 DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
-DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' )
-
-# We don't include python-future (not to be confused with pythonfutures) because
-# it needs to be inserted in sys.path AFTER the standard library imports but we
-# can't do that with PYTHONPATH because the std lib paths are always appended to
-# PYTHONPATH. We do it correctly inside Vim because we have access to the right
-# sys.path. So for dev, we rely on python-future being installed correctly with
-#
-#   pip install -r python/test_requirements.txt
-#
-# Pip knows how to install this correctly so that it doesn't matter where in
-# sys.path the path is.
-python_path = [ p.join( DIR_OF_THIRD_PARTY, 'pythonfutures' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests-futures' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'chardet' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'certifi' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'idna' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'requests' ),
-                p.join( DIR_OF_THIRD_PARTY, 'requests_deps', 'urllib3', 'src' ),
-                p.join( DIR_OF_THIRD_PARTY, 'ycmd' ) ]
-if os.environ.get( 'PYTHONPATH' ):
-  python_path.append( os.environ[ 'PYTHONPATH' ] )
-os.environ[ 'PYTHONPATH' ] = os.pathsep.join( python_path )
 
 
 def RunFlake8():
--- a/python/ycm/tests/youcompleteme_test.py
+++ b/python/ycm/tests/youcompleteme_test.py
@@ -32,7 +32,6 @@
 from unittest.mock import call, MagicMock, patch
 
 from ycm import vimsupport
-from ycm.paths import _PathToPythonUsedDuringBuild
 from ycm.vimsupport import ( SetVariableValue,
                              SIGN_BUFFER_ID_INITIAL_VALUE )
 from ycm.tests import ( StopServer,
@@ -53,62 +52,6 @@
   assert_that( 'ycm_core', is_not( is_in( sys.modules ) ) )
 
 
-@patch( 'ycm.vimsupport.PostVimMessage' )
-def YouCompleteMe_InvalidPythonInterpreterPath_test( post_vim_message ):
-  with UserOptions( {
-    'g:ycm_server_python_interpreter': '/invalid/python/path' } ):
-    try:
-      ycm = YouCompleteMe()
-
-      assert_that( ycm.IsServerAlive(), equal_to( False ) )
-      post_vim_message.assert_called_once_with(
-        "Unable to start the ycmd server. "
-        "Path in 'g:ycm_server_python_interpreter' option does not point "
-        "to a valid Python 3.6+. "
-        "Correct the error then restart the server with ':YcmRestartServer'." )
-
-      post_vim_message.reset_mock()
-
-      SetVariableValue( 'g:ycm_server_python_interpreter',
-                        _PathToPythonUsedDuringBuild() )
-      ycm.RestartServer()
-
-      assert_that( ycm.IsServerAlive(), equal_to( True ) )
-      post_vim_message.assert_called_once_with( 'Restarting ycmd server...' )
-    finally:
-      WaitUntilReady()
-      StopServer( ycm )
-
-
-@patch( 'ycmd.utils.PathToFirstExistingExecutable', return_value = None )
-@patch( 'ycm.paths._EndsWithPython', return_value = False )
-@patch( 'ycm.vimsupport.PostVimMessage' )
-def YouCompleteMe_NoPythonInterpreterFound_test( post_vim_message, *args ):
-  with UserOptions( {} ):
-    try:
-      with patch( 'ycmd.utils.ReadFile', side_effect = IOError ):
-        ycm = YouCompleteMe()
-
-      assert_that( ycm.IsServerAlive(), equal_to( False ) )
-      post_vim_message.assert_called_once_with(
-        "Unable to start the ycmd server. Cannot find Python 3.6+. "
-        "Set the 'g:ycm_server_python_interpreter' option to a Python "
-        "interpreter path. "
-        "Correct the error then restart the server with ':YcmRestartServer'." )
-
-      post_vim_message.reset_mock()
-
-      SetVariableValue( 'g:ycm_server_python_interpreter',
-                        _PathToPythonUsedDuringBuild() )
-      ycm.RestartServer()
-
-      assert_that( ycm.IsServerAlive(), equal_to( True ) )
-      post_vim_message.assert_called_once_with( 'Restarting ycmd server...' )
-    finally:
-      WaitUntilReady()
-      StopServer( ycm )
-
-
 def RunNotifyUserIfServerCrashed( ycm, post_vim_message, test ):
   StopServer( ycm )
 
--- a/python/ycm/tests/paths_test.py
+++ b/python/ycm/tests/paths_test.py
@@ -14,42 +14,3 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with YouCompleteMe.  If not, see <http://www.gnu.org/licenses/>.
-
-from ycm.tests.test_utils import MockVimModule
-MockVimModule()
-
-import pytest
-from hamcrest import assert_that
-from ycm.paths import _EndsWithPython
-
-
-def EndsWithPython_Good( path ):
-  assert_that( _EndsWithPython( path ),
-              f'Path { path } does not end with a Python name.' )
-
-
-def EndsWithPython_Bad( path ):
-  assert_that( not _EndsWithPython( path ),
-              f'Path { path } does end with a Python name.' )
-
-
-@pytest.mark.parametrize( 'path', [
-    'python3',
-    '/usr/bin/python3.6',
-    '/home/user/.pyenv/shims/python3.6',
-    r'C:\Python36\python.exe'
-  ] )
-def EndsWithPython_Python3Paths_test( path ):
-  EndsWithPython_Good( path )
-
-
-@pytest.mark.parametrize( 'path', [
-    None,
-    '',
-    '/opt/local/bin/vim',
-    r'C:\Program Files\Vim\vim74\gvim.exe',
-    '/usr/bin/python2.7',
-    '/home/user/.pyenv/shims/python3.2',
-  ] )
-def EndsWithPython_BadPaths_test( path ):
-  EndsWithPython_Bad( path )
