From f6856d66876a35e74ef64a90869bbd59015b6639 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Wed, 27 May 2015 13:32:39 -0400 Subject: [PATCH] Try to test against Python 3.5 --- .travis.yml | 1 + .travis/install.sh | 6 ++++++ .travis/run.sh | 11 +++++++++-- tests/functional/test_install_upgrade.py | 4 ++++ tox.ini | 3 ++- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d53ff1c2..9812384a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 + - TOXENV=py35 - TOXENV=pypy - TOXENV=py27 VENDOR=no - TOXENV=py34 VENDOR=no diff --git a/.travis/install.sh b/.travis/install.sh index 4c30bb06c..e36014e9e 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -7,3 +7,9 @@ git config --global user.name "pip" pip install --upgrade setuptools pip install coverage diff_cover tox + +# If we're running under Python 3.5, then we need to actually go and install +# Python 3.5. +if [[ $TOXENV = "py35" ]]; then + sudo python-build 3.5-dev /opt/python/3.5-dev +fi diff --git a/.travis/run.sh b/.travis/run.sh index ab2c7e966..4e3f6b896 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -2,6 +2,13 @@ set -e set -x +# If we're running under Python 3.5 make sure our Python 3.5 bin directory is +# added to the $PATH +if [[ $TOXENV = "py35" ]]; then + export PATH="/opt/python/3.5-dev/bin:$PATH" + export TOXARGS="--assert=plain" +fi + # We want to create the virtual environment here, but not actually run anything tox --notest @@ -32,14 +39,14 @@ if [[ $VENDOR = "no" ]]; then fi # Run the unit tests -tox -- -m unit --cov pip/ --cov-report xml +tox -- -m unit --cov pip/ --cov-report xml $TOXARGS # Run our integration tests # Note: There is an issue with Python 3.2 where concurrent imports will corrupt # the generated .pyc files and we'll get very strange errors. However as # long as we continue to run the unit tests first and in a seperate step # then this should work fine. -tox -- -m integration -n 8 +tox -- -m integration -n 8 $TOXARGS if [[ $TRAVIS_PULL_REQUEST != "false" ]] then diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py index 7271c2493..13e8108fc 100644 --- a/tests/functional/test_install_upgrade.py +++ b/tests/functional/test_install_upgrade.py @@ -343,6 +343,10 @@ class TestUpgradeDistributeToSetuptools(object): expect_stderr=True, ) + @pytest.mark.skipif( + sys.version_info >= (3, 5), + reason="distribute doesn't work on Python 3.5", + ) def test_from_distribute_6_to_setuptools_7( self, script, data, virtualenv): self.prep_ve( diff --git a/tox.ini b/tox.ini index 76ddee28d..fe03b70a6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] -envlist = docs, packaging, pep8, py3pep8, py26, py27, py32, py33, py34, pypy +envlist = + docs, packaging, pep8, py3pep8, py26, py27, py32, py33, py34, py35, pypy [testenv] setenv =