Use tox on travis.

This commit is contained in:
INADA Naoki
2013-09-25 00:17:04 +09:00
parent 93bb31165d
commit 70d322724d
2 changed files with 13 additions and 9 deletions

View File

@@ -1,22 +1,18 @@
language: python language: python
python: "2.7"
python:
- "2.6"
- "2.7"
- "3.3"
- "pypy"
before_install: before_install:
- sudo add-apt-repository -y ppa:pypy/ppa
- sudo apt-get update -qq -y - sudo apt-get update -qq -y
- sudo apt-get -y dist-upgrade - sudo apt-get -y dist-upgrade
- sudo apt-get -y install pypy
install: install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors unittest2; fi - pip install -M tox
- python setup.py develop
before_script: before_script:
- "mysql -e 'create database test_pymysql DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'" - "mysql -e 'create database test_pymysql DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'"
- "mysql -e 'create database test_pymysql2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'" - "mysql -e 'create database test_pymysql2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'"
- cp .travis.databases.json pymysql/tests/databases.json - cp .travis.databases.json pymysql/tests/databases.json
script: ./runtests.py script: tox

8
tox.ini Normal file
View File

@@ -0,0 +1,8 @@
[tox]
envlist = py26,py27,py33,pypy
[testenv]
commands = ./runtests.py
[testenv:py26]
deps = unittest2