1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Add tox for testing with different Python versions.

This commit is contained in:
William Ting 2014-06-28 16:57:00 -07:00
parent 3465bb1f84
commit 969fb4e6ed
6 changed files with 49 additions and 17 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@
*~ *~
*.tar.gz *.tar.gz
*.patch *.patch
.tox
tags tags

View File

@ -1,14 +1,17 @@
language: python language: python
python: python: 2.7
- 2.6
- 2.7 env:
- 3.2 - TOX_ENV=py26
- 3.3 - TOX_ENV=py27
- 3.4 - TOX_ENV=py32
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=flake8
install: install:
- pip install --use-mirrors pytest - pip install tox
script: script:
- make test - tox -e $TOX_ENV

View File

@ -14,7 +14,7 @@ docs:
pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md pandoc -s -w markdown docs/header.md docs/install.md docs/body.md -o README.md
lint: lint:
@flake8 ./ --config=setup.cfg @flake8 ./ --config=tox.ini
release: docs release: docs
# Check for tag existence # Check for tag existence
@ -38,6 +38,6 @@ tar:
git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz git archive --format=tar --prefix autojump_v$(VERSION)/ $(TAGNAME) | gzip > autojump_v$(VERSION).tar.gz
sha1sum autojump_v$(VERSION).tar.gz sha1sum autojump_v$(VERSION).tar.gz
test: test: lint
@find . -type f -iname "*.pyc" -delete @find . -type f -iname "*.pyc" -delete
py.test -rsxX -q tox

View File

@ -1,3 +1,4 @@
flake8>=2.0.0 flake8
mock mock
pytest pytest
tox

View File

@ -1,5 +0,0 @@
[flake8]
filename = *.py,autojump
ignore = E126,E128
max-line-length = 79
max-complexity = 10

32
tox.ini Normal file
View File

@ -0,0 +1,32 @@
[tox]
envlist =
py26,
py27,
py32,
py33,
py34
# ignore missing setup.py
skipsdist = True
[testenv]
deps = -rdev-requirements.txt
commands = py.test -rsxX -q
[testenv:flake8]
deps = flake8
commands = flake8 .
[flake8]
filename =
*.py,
autojump
ignore =
E126,
E128
max-line-length = 79
max-complexity = 10
show-pep8 = True
[pytest]
addopts = -rsxX -q
norecursedirs = .git .tox docs