mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-23 20:36:40 +02:00
coverage: Explicit coverage tracking no longer needed
This commit is contained in:
parent
1889ee5e1e
commit
21b766134f
6 changed files with 1 additions and 31 deletions
|
@ -1,2 +1,2 @@
|
||||||
[report]
|
[report]
|
||||||
omit = */python2.7/*,*/test*,*/__init__.py,*/taskwiki/coverage.py
|
omit = */python2.7/*,*/test*,*/__init__.py
|
||||||
|
|
|
@ -58,13 +58,9 @@ install:
|
||||||
- popd
|
- popd
|
||||||
# Setup taskwiki
|
# Setup taskwiki
|
||||||
- cp -r $TRAVIS_BUILD_DIR ~/.vim/bundle/taskwiki
|
- cp -r $TRAVIS_BUILD_DIR ~/.vim/bundle/taskwiki
|
||||||
- mkdir ~/taskwiki-coverage
|
|
||||||
before_script:
|
before_script:
|
||||||
- cd ~/.vim/bundle/taskwiki
|
- cd ~/.vim/bundle/taskwiki
|
||||||
script:
|
script:
|
||||||
- py.test -vv --cov .
|
- py.test -vv --cov .
|
||||||
- "mv ~/taskwiki-coverage/.coverage.* . || :"
|
|
||||||
- "coverage combine || :"
|
|
||||||
- "coverage report || :"
|
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
|
|
|
@ -674,10 +674,6 @@ constructs.
|
||||||
*taskwiki_disable*
|
*taskwiki_disable*
|
||||||
Setting any non-empty value for this variable will disable taskwiki.
|
Setting any non-empty value for this variable will disable taskwiki.
|
||||||
|
|
||||||
*taskwiki_measure_coverage*
|
|
||||||
Development only. Uses python-coverage to track how much of the code
|
|
||||||
is covered by tests.
|
|
||||||
|
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
9. TROUBLESHOOTING *taskwiki-trouble*
|
9. TROUBLESHOOTING *taskwiki-trouble*
|
||||||
|
|
|
@ -27,11 +27,6 @@ endif
|
||||||
" Determine the plugin path
|
" Determine the plugin path
|
||||||
let s:plugin_path = escape(expand('<sfile>:p:h:h'), '\')
|
let s:plugin_path = escape(expand('<sfile>:p:h:h'), '\')
|
||||||
|
|
||||||
" Run the measure parts first, if desired
|
|
||||||
if exists("g:taskwiki_measure_coverage")
|
|
||||||
execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/coverage.py'"
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Execute the main body of taskwiki source
|
" Execute the main body of taskwiki source
|
||||||
execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/main.py'
|
execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/main.py'
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
import vim
|
|
||||||
import os
|
|
||||||
|
|
||||||
# Start measuring coverage if in testing
|
|
||||||
if vim.vars.get('taskwiki_measure_coverage'):
|
|
||||||
import atexit
|
|
||||||
import coverage
|
|
||||||
coverage_path = os.path.expanduser('~/taskwiki-coverage/.coverage.{0}'.format(os.getpid()))
|
|
||||||
cov = coverage.coverage(data_file=coverage_path)
|
|
||||||
cov.start()
|
|
||||||
|
|
||||||
def save_coverage():
|
|
||||||
cov.stop()
|
|
||||||
cov.save()
|
|
||||||
|
|
||||||
atexit.register(save_coverage)
|
|
|
@ -66,7 +66,6 @@ class IntegrationTest(object):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def configure_global_varialbes(self):
|
def configure_global_varialbes(self):
|
||||||
self.command('let g:taskwiki_measure_coverage="yes"')
|
|
||||||
self.command('let g:taskwiki_data_location="{0}"'.format(self.dir))
|
self.command('let g:taskwiki_data_location="{0}"'.format(self.dir))
|
||||||
self.command('let g:taskwiki_taskrc_location="{0}"'.format(self.taskrc_path))
|
self.command('let g:taskwiki_taskrc_location="{0}"'.format(self.taskrc_path))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue