Skip to content

Commit

Permalink
tests: Use pytest-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
tbabej committed Jul 31, 2018
1 parent cb22fd5 commit bda5df4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ install:
- mkdir ~/taskwiki-coverage
- docker build --build-arg TASK_VERSION=$TASK_VERSION -t test_taskwiki .
script:
- sudo docker run --security-opt label=type:container_runtime_t -v "$HOME/.Xauthority:/root/.Xauthority:rw" -v "$HOME/taskwiki-coverage:/root/taskwiki-coverage:rw" -v "$PWD:/root/.vim/bundle/taskwiki" --net host -e DISPLAY -it test_taskwiki
- make test
after_success:
- ls ~/taskwiki-coverage
- mv ~/taskwiki-coverage/.coverage.* . || echo ok
- coverage combine
- coverage report
- coveralls
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ RUN cd /root/.vim/bundle; git clone https://github.com/vimwiki/vimwiki.git
RUN cd /root/.vim/bundle/vimwiki/; git checkout dev

# Setup taskwiki
RUN pip3 install nose pytest coveralls coverage vimrunner
RUN pip3 install nose pytest pytest-cov coveralls coverage vimrunner
ADD requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
RUN mkdir /root/.vim/bundle/taskwiki
WORKDIR /root/.vim/bundle/taskwiki

CMD ["sh", "-c", "python3 -m pytest -vv tests/"]
CMD ["sh", "-c", "python3 -m pytest -vv --cov tests/"]

0 comments on commit bda5df4

Please sign in to comment.