language: python
python:
 - "2.6"
 - "2.7"
 - "3.2"
 - "3.3"
 - "3.4"
 - "pypy"
 - "pypy3"
sudo: false
addons:
  apt:
    packages:
    - curl
    - zlib1g
    - zlib1g-dev
install: 
 - ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/
 - pip install pillow unittest2 ; true
script: tests/alltests.py

language: python
python:
 - "2.6"
 - "2.7"
 - "3.2"
 - "3.3"
 - "3.4"
 - "pypy"
 - "pypy3"
sudo: false
addons:
  apt:
    packages:
    - curl
    - zlib1g
    - zlib1g-dev
install: 
 - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then travis_retry pip install unittest2; fi
 - pip install pillow
script: tests/alltests.py

Make unittest2 conditional. It is already included in Python 2.7 and up.
Travis: Make unittest2 conditional.
It is already included in Python 2.7 and up.