diff --git a/tests/p_python/0-install-python.sh b/tests/p_python/0-install-python.sh index d102bb6..3ba2adc 100755 --- a/tests/p_python/0-install-python.sh +++ b/tests/p_python/0-install-python.sh @@ -4,4 +4,8 @@ # Install python t_Log "Running $0 - installing python." +if [ "$centos_ver" -ge 8 ] ; then +t_InstallPackage python36 +else t_InstallPackage python +fi diff --git a/tests/p_python/10-test_python.sh b/tests/p_python/10-test_python.sh index 52f27ef..57fec65 100755 --- a/tests/p_python/10-test_python.sh +++ b/tests/p_python/10-test_python.sh @@ -4,15 +4,21 @@ t_Log "Running $0 - python can print Hello World" +if [ "$centos_ver" -ge 8 ] ; then +PYTHON=python3 +else +PYTHON=python +fi + # creating source file FILE='/var/tmp/python-test.py' cat > $FILE </dev/null 2>&1 # Installing additional python/mysql module +if [ "$centos_ver" -ge 8 ] ; then +t_InstallPackage python3-PyMySQL +importcomponent="pymysql" +else t_InstallPackage MySQL-python +importcomponent="MySQLdb" +fi # create python Scrip SCRIPT='/var/tmp/test.py' cat >$SCRIPT <