patch 8.2.0665: wrongly assuming Python executable is called "python"

Problem:    Wrongly assuming Python executable is called "python".
Solution:   Use detected python command. (Ken Takata, closes #6016)
            Also use CheckFunction if possible.
diff --git a/src/testdir/check.vim b/src/testdir/check.vim
index efb273b..2a45997 100644
--- a/src/testdir/check.vim
+++ b/src/testdir/check.vim
@@ -52,6 +52,14 @@
   endif
 endfunc
 
+" Command to check for the presence of python.  Argument should have been
+" obtained with PythonProg()
+func CheckPython(name)
+  if a:name == ''
+    throw 'Skipped: python command not available'
+  endif
+endfunc
+
 " Command to check for running on MS-Windows
 command CheckMSWindows call CheckMSWindows()
 func CheckMSWindows()