Skip to content

Commit

Permalink
Use tox instead of setup.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm authored and chobeat committed Oct 16, 2018
1 parent 54214d0 commit d8871ee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ before_script:
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
script:
- python setup.py test
# ^ Change here if using tox
- python setup.py develop
- tox
- |
if [[ "$COVERAGE" == "true" ]]; then
pre-commit install
pre-commit run --all-files
fi
after_success:
- if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi
after_script:
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ For more information about PyScaffold and its extension mechanism, check out htt

.. _Jupyter notebook: https://jupyter-notebook.readthedocs.io/
.. _flake8: http://flake8.pycqa.org/

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
# Example:
# numpy==1.13.3
# scipy==1.0

2 changes: 0 additions & 2 deletions tests/test_generated_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ def test_generated_extension(tmpfolder):
assert os.path.exists("the_actual_project/setup.cfg")

os.chdir("the_actual_project")
# formatting pyscaffold docs skeleton to pass flake8.
# call(["autopep8", "--max-line-length", "79", "-i", "-r", "docs"])
flake8_project_res = call("flake8")
assert flake8_project_res == 0
5 changes: 5 additions & 0 deletions tests/travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ if [[ "$COVERAGE" == "true" ]]; then
fi


# for all
pip install tox
pip install -U pip setuptools


travis-cleanup() {
printf "Cleaning up environments ... " # printf avoids new lines
if [[ "$DISTRIB" == "conda" ]]; then
Expand Down

0 comments on commit d8871ee

Please sign in to comment.