Skip to content

Commit 7561352

Browse files
committed
need to test python3 as well
1 parent 4908c95 commit 7561352

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

.travis/before_install

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,7 @@ sudo apt-get update && sudo apt-get install -y wget git build-essential squashfs
1111

1212
sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
1313

14-
if [ "${PYTHON_VERSION}" == "2" ];
15-
then
16-
wget https://repo.continuum.io/archive/Anaconda2-5.0.0.1-Linux-x86_64.sh
17-
sudo bash Anaconda2-5.0.0.1-Linux-x86_64.sh -b -p /opt/conda && sudo chown -R 0755 /opt/conda
18-
PATH=/opt/conda/bin:$PATH
19-
rm Anaconda2-5.0.0.1-Linux-x86_64.sh
20-
export PATH
21-
else
22-
wget https://repo.continuum.io/archive/Anaconda3-5.0.0.1-Linux-x86_64.sh
23-
sudo bash Anaconda3-5.0.0.1-Linux-x86_64.sh -b -p /opt/conda && sudo chown -R 0755 /opt/conda
24-
PATH=/opt/conda/bin:$PATH
25-
rm Anaconda3-5.0.0.1-Linux-x86_64.sh
26-
export PATH
27-
fi
28-
29-
# Install python dependencies
30-
/opt/conda/bin/pip install --upgrade pip && \
31-
/opt/conda/bin/pip install requests
14+
echo "PYTHON VERSION"
3215
which python
3316

3417
python setup.py sdist && python setup.py install

.travis/script

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/bash
22
sudo apt-get install -y squashfs-tools
3-
python -m unittest discover -s $TRAVIS_BUILD_DIR/spython/tests/ -p '[t|T]est*.py'
3+
4+
if [ "${PYTHON_VERSION}" == "2" ];
5+
then
6+
python -m unittest discover -s $TRAVIS_BUILD_DIR/spython/tests/ -p '[t|T]est*.py'
7+
else
8+
python3 -m unittest discover -s $TRAVIS_BUILD_DIR/spython/tests/ -p '[t|T]est*.py'
9+
fi

0 commit comments

Comments
 (0)