Repository: EUDAT-B2HANDLE/PYHANDLE (language: python)

Issue:
Python 3.7
Support of python 3.7 for tests


Discussion / hints:

Fix patch:
diff --git a/Jenkinsfile b/Jenkinsfile
index b374c1c..88bece9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -63,6 +63,23 @@ pipeline {
                         cobertura coberturaReportFile: '**/coverage.xml'
                     }
                 }
+                stage ('Test python 3.7') {
+                    agent {
+                        dockerfile {
+                            filename "pyhandle/tests/Dockerfile-py3.7"
+                            dir "$PROJECT_DIR"
+                            additionalBuildArgs "-t eudat-pyhandle:py3.7"
+                            args "-u root:root"
+                        }
+                    }
+                    steps {
+                        sh '''
+                            cd $WORKSPACE/$PROJECT_DIR/pyhandle/tests
+                            ./docker-entrypoint.sh coverage
+                        '''
+                        cobertura coberturaReportFile: '**/coverage.xml'
+                    }
+                }
             }
        }
     }
diff --git a/setup.py b/setup.py
index b50f1aa..8dffec0 100644
--- a/setup.py
+++ b/setup.py
@@ -94,8 +94,8 @@ def find_version(*file_paths):
           'future',
           'six',
           'pymysql==0.8.0 ; python_version < "2.8.0"',
-          'pymysql==0.8.0 ; python_version < "3.6.0"',
-          'pymysql==1.2.0 ; python_version > "3.6.0"'
+          'pymysql==0.8.0 ; python_version < "3.8.0"',
+          'pymysql==1.2.0 ; python_version > "3.8.0"'
 
       ],
       tests_require=test_dependencies,


Test patch:
diff --git a/pyhandle/tests/Dockerfile-py3.7 b/pyhandle/tests/Dockerfile-py3.7
new file mode 100644
index 0000000..b741ca3
--- /dev/null
+++ b/pyhandle/tests/Dockerfile-py3.7
@@ -0,0 +1,15 @@
+# vim:set ft=dockerfile:
+FROM       python:3.7
+
+RUN        pip install \
+           mock \
+           coverage \
+           nose
+
+ADD        . /opt/PYHANDLE
+RUN        cd /opt/PYHANDLE && \
+           python setup.py install
+
+WORKDIR    /opt/PYHANDLE/pyhandle/tests
+
+CMD ["./docker-entrypoint.sh", "coverage"]