Commit 3f2ec123 authored by MinchinWeb's avatar MinchinWeb

Convert test command to `green`

parent e143dca2
...@@ -14,10 +14,13 @@ matrix: ...@@ -14,10 +14,13 @@ matrix:
- python: "pypy" - python: "pypy"
- python: "pypy3" - python: "pypy3"
install: install:
- "python -m pip install pip --upgrade"
- "pip install ." - "pip install ."
- "pip install icalendar" - "pip install .[ical]"
- "pip install pylint" - "pip install .[test]"
script: "./run-tests.sh" script:
- "green -vvr"
- "python -m pylint --errors-only topydo test"
# Cache Dependencies # Cache Dependencies
cache: cache:
directories: directories:
......
...@@ -22,7 +22,7 @@ smoothly into topydo. ...@@ -22,7 +22,7 @@ smoothly into topydo.
* Run tests with: * Run tests with:
./run-tests.sh [python2|python3] green
Obviously, I won't accept anything that makes the tests fail. When you submit Obviously, I won't accept anything that makes the tests fail. When you submit
a Pull Request, Travis CI will automatically run all tests for various Python a Pull Request, Travis CI will automatically run all tests for various Python
......
#!/bin/bash
if [ "$1" = "python2" ] || [ "$1" = "python3" ]; then
PYTHON=$1
else
# run whatever is active
PYTHON=python
fi
# Run normal tests
if ! $PYTHON setup.py test; then
exit 1
fi
# pylint is not supported on 3.2, so skip the test there
if $PYTHON --version 2>&1 | grep 'Python 3\.2' > /dev/null; then
exit 0
fi
if ! $PYTHON -m pylint --errors-only topydo test; then
exit 1
fi
exit 0
...@@ -38,6 +38,8 @@ setup( ...@@ -38,6 +38,8 @@ setup(
'ical': ['icalendar'], 'ical': ['icalendar'],
'prompt-toolkit': ['prompt-toolkit >= 0.53'], 'prompt-toolkit': ['prompt-toolkit >= 0.53'],
'edit-cmd-tests': ['mock'], 'edit-cmd-tests': ['mock'],
'test': ['green', 'coverage'],
'test:python_version!="3.2"': ['pylint'],
}, },
entry_points= { entry_points= {
'console_scripts': ['topydo = topydo.cli.UILoader:main'], 'console_scripts': ['topydo = topydo.cli.UILoader:main'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment