language: python
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"
  - "nightly"

script:
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.6" ]]; then pip install unittest2 ; fi
  - python setup.py test
  - if [[ "$TRAVIS_PYTHON_VERSION" != "nightly" ]]; then coverage run setup.py test ; fi

notifications:
  email: false
before_install:
  - pip install codecov
  - mkdir bad_tests
  - wget https://hg.python.org/cpython/archive/3.6.tar.bz2/Lib/test/ -O bad_tests/test.tar.bz2
  - tar -xjf bad_tests/test.tar.bz2 -C bad_tests/
  - mv bad_tests/cpython-*/Lib/test/badsyntax_future* . -v
  - rm -r bad_tests/
after_success:
  - codecov

language: python
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"
  - "nightly"

script:
  - if [[ "$TRAVIS_PYTHON_VERSION" == "2.6" ]]; then pip install unittest2 ; fi
  # Flake8 requires setuptools > 30, but some preinstalled are to old for that
  - pip install --upgrade setuptools
  - python setup.py test
  - if [[ "$TRAVIS_PYTHON_VERSION" != "nightly" ]]; then coverage run setup.py test ; fi

notifications:
  email: false
before_install:
  - pip install codecov
  - mkdir bad_tests
  - wget https://hg.python.org/cpython/archive/3.6.tar.bz2/Lib/test/ -O bad_tests/test.tar.bz2
  - tar -xjf bad_tests/test.tar.bz2 -C bad_tests/
  - mv bad_tests/cpython-*/Lib/test/badsyntax_future* . -v
  - rm -r bad_tests/
after_success:
  - codecov

Upgrade setuptools according to Flake8 requirement
Upgrade setuptools according to Flake8 requirement

Flake8 now requires setuptools to be at least version 30, but some Python
versions come installed with an older version and so we need to manually
update it before we can actually run the tests.
