Skip to content

Commit

Permalink
Improve tox ini (#2031)
Browse files Browse the repository at this point in the history
* Improve tox.ini to be able to run only some tests

This change will make tox use posargs if there are any or fallback to
"tests" args (which will run the all the tests).

You can now use this command to start a specific test:

tox -e py35 -- -x tests/test_client_connection.py

* Add Python 3.6 to the testing environment
  • Loading branch information
cecton authored and asvetlov committed Jun 28, 2017
1 parent 0957977 commit 6ba5d61
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]

envlist = check, {py34,py35}-{debug,release}-{cchardet,cython,pure}, report
envlist = check, {py34,py35,py36}-{debug,release}-{cchardet,cython,pure}, report

[testenv]

Expand All @@ -17,7 +17,7 @@ deps =
commands =
# --cov={envsitepackagesdir}/tests
# py.test --cov={envsitepackagesdir}/aiohttp tests {posargs}
coverage run -m pytest tests {posargs}
coverage run -m pytest {posargs:tests}
mv .coverage .coverage.{envname}

setenv =
Expand All @@ -27,6 +27,7 @@ setenv =
basepython:
py34: python3.4
py35: python3.5
py36: python3.6

whitelist_externals =
coverage
Expand All @@ -47,7 +48,7 @@ commands =
coverage erase

basepython:
python3.5
python3.6

[testenv:report]

Expand All @@ -58,4 +59,4 @@ commands =
echo "open file://{toxinidir}/coverage/index.html"

basepython:
python3.5
python3.6

0 comments on commit 6ba5d61

Please sign in to comment.