summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2016-10-05 20:57:24 -0700
committerTim Orling <timothy.t.orling@linux.intel.com>2016-10-05 20:57:24 -0700
commite46925aadc96e5ddf77519da3445deede8c47bb7 (patch)
tree39aeb09d1f74aa50096382b7837ba226d7061290
parent45c831f1399bb8199e2ec297ffe98c91a1b960f3 (diff)
downloadepel6-testing-container-e46925aadc96e5ddf77519da3445deede8c47bb7.tar.gz
epel6-testing-container-e46925aadc96e5ddf77519da3445deede8c47bb7.tar.xz
epel6-testing-container-e46925aadc96e5ddf77519da3445deede8c47bb7.zip
add python34 test: modules new to python34
Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
-rw-r--r--Dockerfile2
-rw-r--r--tests/test_python34.py48
2 files changed, 49 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 308f9d6..c8f06c8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,7 +17,7 @@ FROM centos:6.8
RUN yum -y update; yum clean all
RUN yum -y install epel-release; yum clean all
-RUN yum -y install rpm python python-pip epel-rpm-macros python-rpm-macros; yum clean all
+RUN yum -y install rpm python python-pip epel-rpm-macros python-rpm-macros python34; yum clean all
RUN yum -y update --enablerepo=epel-testing
RUN pip install -U pytest
COPY tests/* tests/
diff --git a/tests/test_python34.py b/tests/test_python34.py
new file mode 100644
index 0000000..ce92c7b
--- /dev/null
+++ b/tests/test_python34.py
@@ -0,0 +1,48 @@
+# Copyright (C) 2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import os
+import pytest
+import shlex
+from subprocess import Popen, PIPE
+
+def python34_module(modulename):
+ cmd = shlex.split("python3 -m {}" % modulename)
+ output = Popen(cmd, stdout=PIPE).communicate()[0]
+ return output
+
+
+class TestNewPython34Modules:
+
+ def test_python34_asyncio(self):
+ python34_module("asyncio")
+
+ def test_python34_ensurepip(self, python34_module("ensurepip")):
+ python34_module("ensurepip")
+
+ def test_python34_enum(self, python34_module("enum")):
+ python34_module("enum")
+
+ def test_python34_pathlib(self, python34_module("pathlib")):
+ python34_module("pathlib")
+
+ def test_python34_selectors(self, python34_module("selectors")):
+ python34_module("selectors")
+
+ def test_python34_statistics(self, python34_module("statistics")):
+ python34_module("statistics")
+
+ def test_python34_tracemalloc(self, python34_module("tracemalloc")):
+ python34_module("tracemalloc")