summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2021-01-15 13:06:32 -0800
committerAdam Hupp <adam@hupp.org>2021-01-15 13:06:32 -0800
commite9287aff879335da342863e2dcc7ae224b9e258c (patch)
treecb624460f6b831b3046b760eb500b36c5e0777f5
parenteccbe10b03d9bed19f5d7e373b3febf9036a4293 (diff)
downloadpython-magic-e9287aff879335da342863e2dcc7ae224b9e258c.tar.gz
Revert "Remove Python2 from the tests"
This reverts commit 4a810b4f30f161b889d59cf2a207820fc0c731b7.
-rw-r--r--.travis.yml1
-rwxr-xr-xtest/Dockerfile_archlinux2
-rwxr-xr-xtest/Dockerfile_bionic1
-rw-r--r--test/Dockerfile_centos72
-rw-r--r--test/Dockerfile_centos82
-rwxr-xr-xtest/Dockerfile_focal1
-rwxr-xr-xtest/Dockerfile_xenial1
-rw-r--r--test/run.py2
-rw-r--r--tox.ini1
9 files changed, 10 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 688c07d..8c306d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ dist: xenial
cache: pip
python:
+ - "2.7"
- "3.5"
- "3.6"
- "3.7"
diff --git a/test/Dockerfile_archlinux b/test/Dockerfile_archlinux
index 1410cd1..677add4 100755
--- a/test/Dockerfile_archlinux
+++ b/test/Dockerfile_archlinux
@@ -1,5 +1,5 @@
FROM archlinux:20200505
RUN yes | pacman -Syyu --overwrite '*'
-RUN yes | pacman -S python file which
+RUN yes | pacman -S python python2 file which
COPY . /python-magic
CMD cd /python-magic/test && python3 ./run.py
diff --git a/test/Dockerfile_bionic b/test/Dockerfile_bionic
index 0c9893e..e335b8e 100755
--- a/test/Dockerfile_bionic
+++ b/test/Dockerfile_bionic
@@ -1,5 +1,6 @@
FROM ubuntu:bionic
RUN apt-get update
+RUN apt-get -y install python
RUN apt-get -y install python3
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
diff --git a/test/Dockerfile_centos7 b/test/Dockerfile_centos7
index c418834..8620e7e 100644
--- a/test/Dockerfile_centos7
+++ b/test/Dockerfile_centos7
@@ -1,5 +1,5 @@
FROM centos:7
RUN yum -y update
-RUN yum -y install file-devel python3 which
+RUN yum -y install file-devel python3 python2 which
COPY . /python-magic
CMD cd /python-magic/test && python3 ./run.py
diff --git a/test/Dockerfile_centos8 b/test/Dockerfile_centos8
index ab68288..505221b 100644
--- a/test/Dockerfile_centos8
+++ b/test/Dockerfile_centos8
@@ -1,5 +1,5 @@
FROM centos:8
RUN yum -y update
-RUN yum -y install file-libs python3 which
+RUN yum -y install file-libs python3 python2 which
COPY . /python-magic
CMD cd /python-magic/test && python3 ./run.py
diff --git a/test/Dockerfile_focal b/test/Dockerfile_focal
index b0b1c1c..74e4d78 100755
--- a/test/Dockerfile_focal
+++ b/test/Dockerfile_focal
@@ -1,5 +1,6 @@
FROM ubuntu:focal
RUN apt-get update
+RUN apt-get -y install python2
RUN apt-get -y install python3
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
diff --git a/test/Dockerfile_xenial b/test/Dockerfile_xenial
index 64533c9..bc0440b 100755
--- a/test/Dockerfile_xenial
+++ b/test/Dockerfile_xenial
@@ -1,5 +1,6 @@
FROM ubuntu:xenial
RUN apt-get update
+RUN apt-get -y install python
RUN apt-get -y install python3
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
diff --git a/test/run.py b/test/run.py
index 733db4d..c4b8d0a 100644
--- a/test/run.py
+++ b/test/run.py
@@ -29,4 +29,6 @@ def run_test(versions):
if not found:
sys.exit("No versions found: " + str(versions))
+run_test(["python2", "python2.7"])
run_test(["python3.5", "python3.6", "python3.7", "python3.8", "python3.9"])
+
diff --git a/tox.ini b/tox.ini
index 0f0ca13..6559598 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,7 @@
[tox]
envlist =
coverage-clean,
+ py27,
py35,
py36,
py37,