Skip to content

Commit

Permalink
Several python code repo improvements
Browse files Browse the repository at this point in the history
* Use of py.test instead of nosetests
  * Added several plugins commented for the future
  * Use xdist to run tests in parallel, decreased time to 66 secs from 137
* Setup of tox flake8 environment for code standard checks
  * Ignored a lot of errors/warnings to kickstart this. TODO: Remove them from setup.cfg
* Coveralls moved to travis, as coverage should only be submited from CI servers
* Deleted test.py file (no idea what it was doing there)
  • Loading branch information
txomon authored and mattheworiordan committed Feb 21, 2017
1 parent 1ac5a6f commit 99590b6
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ install:
- travis_retry pip install tox
script:
- tox
after_success:
- "if [ $TOX_ENV == 'py27' ]; then pip install coveralls; coveralls; fi"
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include LICENSE LONG_DESCRIPTION.rst
include LICENSE LONG_DESCRIPTION.rst setup.cfg
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ To see what has changed in recent versions of Bundler, see the [CHANGELOG](CHANG
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Ensure you have added suitable tests and the test suite is passing(`nosetests`)
4. Ensure you have added suitable tests and the test suite is passing(`py.test`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

Expand Down
10 changes: 8 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
-r requirements.txt

nose>=1.0.0,<2.0
flake8>=3.2.1,<4
flake8-import-order>=0.11
mock>=1.3.0,<2.0
coveralls>=0.5,<1.0
pep8-naming>=0.4.1
pytest>=3.0.5
pytest-cov>=2.4.0,<3
#pytest-mock>=1.5.0,<2
#pytest-timeout>=1.2.0,<2
pytest-xdist>=1.15.0,<2
responses>=0.5.0,<1.0
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ msgpack-python>=0.4.6
pycrypto>=2.6.1
requests>=2.7.0,<3
six>=1.9.0
websocket-client==0.39.0
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[coverage:run]
branch=True
[flake8]
max-line-length = 120
ignore = E114,E121,E123,E126,E127,E128,E241,E226,E231,E251,E302,E305,E306,E402,E501,F401,F821,F841,I100,I101,I201,N802,W291,W293,W391,W503
15 changes: 0 additions & 15 deletions test.py

This file was deleted.

7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ deps =
-rrequirements-test.txt

commands =
nosetests {posargs:--with-coverage --cover-package=ably -v}
coveralls
py.test -n auto

[testenv:flake8]
commands =
flake8

0 comments on commit 99590b6

Please sign in to comment.