Skip to content

Commit

Permalink
Allow to run tox without travis
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fersing <[email protected]>
  • Loading branch information
PierreF committed Jul 28, 2020
1 parent 1f9fb14 commit f16faf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ matrix:
env: TOXENV=py36
- python: 3.5
env: TOXENV=py35
- python: 2.7 # Legacy Python does not support asyncio and type hints
env: TOXENV=py27 EXCLUDE="--exclude=./.*,./examples/loop_asyncio.py,*/MQTTV5.py,*/MQTTV311.py"
- python: 2.7
env: TOXENV=py27

install:
- git clone https://github.com/eclipse/paho.mqtt.testing.git || true
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[tox]
envlist = py{27,35,36,37,38}

[testenv:py27]
setenv = EXCLUDE = --exclude=./.*,./examples/loop_asyncio.py,*/MQTTV5.py,*/MQTTV311.py

[testenv]
whitelist_externals = echo make
deps =
-rrequirements.txt
flake8
commands =
# $EXCLUDE is defined in .travis.yml as a workaroud for Python 2
flake8 . --count --select=E9,F63,F7,F822,F823 --show-source --statistics {env:EXCLUDE:""}
# $EXCLUDE is defined above in testenv:py27 as a workaroud for Python 2
# which does not support asyncio and type hints
flake8 . --count --select=E9,F63,F7,F822,F823 --show-source --statistics {env:EXCLUDE:}
python setup.py test
make -C test test
# TODO (cclauss) Fix up all these undefined names
Expand Down

0 comments on commit f16faf5

Please sign in to comment.