Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Finer grain control of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duggan committed Oct 1, 2015
1 parent 32375d4 commit 1389a91
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 24 deletions.
21 changes: 15 additions & 6 deletions .travis.yml
Expand Up @@ -3,12 +3,21 @@ sudo: false # use Travis container based infrastructure
language: python

env:
- MOCK=1 TOXENV=py26,coveralls
- MOCK=1 TOXENV=py27,coveralls
- MOCK=1 TOXENV=py33,coveralls
- MOCK=1 TOXENV=py34,coveralls
- MOCK=1 TOXENV=pypy,coveralls
- MOCK=1 TOXENV=pypy3,coveralls
global:
- MOCK=1
matrix:
- TOXENV=py26,tests,coverage,coveralls
- TOXENV=py27,tests,coverage,coveralls
- TOXENV=py33,tests,coverage,coveralls
- TOXENV=py34,tests,coverage,coveralls
- TOXENV=pypy,tests,coverage,coveralls
- TOXENV=pypy3,tests,coverage,coveralls
- TOXENV=py26,install
- TOXENV=py27,install
- TOXENV=py33,install
- TOXENV=py34,install
- TOXENV=pypy,install
- TOXENV=pypy3,install

install:
- pip install tox
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1 +1 @@
include docs/README.rst LICENSE requirements.txt
include docs/README.rst LICENSE requirements/*
File renamed without changes.
2 changes: 2 additions & 0 deletions requirements/coverage.txt
@@ -0,0 +1,2 @@
pytest
pytest-cov
2 changes: 2 additions & 0 deletions requirements/coveralls.txt
@@ -0,0 +1,2 @@
coverage
coveralls
3 changes: 3 additions & 0 deletions requirements/tests.txt
@@ -0,0 +1,3 @@
pytest
pytest-pep8
pep8
4 changes: 1 addition & 3 deletions setup.py
Expand Up @@ -12,9 +12,7 @@
'pontoon',
]

requires = ["docopt >= 0.6.0",
"PyYAML",
"requests"]
requires = open("requirements/base.txt").read().split()

scripts = glob('scripts/pontoon*')

Expand Down
6 changes: 0 additions & 6 deletions test-requirements.txt

This file was deleted.

24 changes: 16 additions & 8 deletions tox.ini
@@ -1,20 +1,28 @@
[tox]
envlist = py26, py27, py33, py34, pypy, pypy3
[pytest]
pep8ignore = E402
addopts = -vv
[pep8]
ignore = E402
[testenv]
deps = -rrequirements.txt
-rtest-requirements.txt
[testenv:install]
commands = pip install .
pontoon --version
[testenv:tests]
whitelist_externals = bats
deps = -rrequirements/base.txt
-rrequirements/tests.txt
commands = bats --tap test/bats
py.test --pep8 pontoon
py.test --cov=pontoon
pep8 scripts/
[testenv:coverage]
deps = -rrequirements/base.txt
-rrequirements/coverage.txt
commands = py.test --cov=pontoon
[testenv:coveralls]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps = -rrequirements/base.txt
-rrequirements/coveralls.txt
commands = coverage report -m
coveralls

[pytest]
pep8ignore = E402
addopts = --ignore=venv
-vv

0 comments on commit 1389a91

Please sign in to comment.