diff --git a/Dockerfile b/Dockerfile index b7e33e6..afe1671 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ RUN cd /root/.vim/bundle/vimwiki/; git checkout dev # Setup taskwiki RUN pip3 install \ - pytest pytest-xdist \ + pytest pytest-cov pytest-xdist \ coveralls coverage \ https://github.com/liskin/vimrunner-python/archive/8c19ff88050c09236e7519425bfae33c687483df.zip ADD requirements.txt requirements.txt diff --git a/Makefile b/Makefile index d295a03..1a7fb14 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,8 @@ test: pytest: $(PYTHON) -m pytest -vv $(PYTEST_FLAGS) tests/ +cover-pytest: PYTEST_FLAGS += --cov=taskwiki cover-pytest: pytest - coverage combine - coverage report if [ "$$TRAVIS" ]; then coveralls; fi xvfb-%: diff --git a/ftplugin/vimwiki/taskwiki.vim b/ftplugin/vimwiki/taskwiki.vim index bd3586d..f01da0c 100644 --- a/ftplugin/vimwiki/taskwiki.vim +++ b/ftplugin/vimwiki/taskwiki.vim @@ -24,11 +24,6 @@ endif " Determine the plugin path let s:plugin_path = escape(expand(':p:h:h:h'), '\') -" Run the measure parts first, if desired -if exists("g:taskwiki_measure_coverage") - execute 'py3file ' . s:plugin_path . '/taskwiki/testcoverage.py' -endif - " Execute the main body of taskwiki source execute g:taskwiki_pyfile . s:plugin_path . '/taskwiki/main.py' diff --git a/taskwiki/testcoverage.py b/taskwiki/testcoverage.py deleted file mode 100644 index 4ec40c4..0000000 --- a/taskwiki/testcoverage.py +++ /dev/null @@ -1,3 +0,0 @@ -import coverage - -coverage.Coverage(auto_data=True, data_suffix=True).start() diff --git a/tests/base.py b/tests/base.py index 6a96bed..9d7c686 100644 --- a/tests/base.py +++ b/tests/base.py @@ -70,7 +70,6 @@ class IntegrationTest(object): 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:vimwiki_list = [{"syntax": "default", "ext": ".txt","path": "%s"}]' % self.dir) - self.command('let g:taskwiki_measure_coverage="yes"') self.command('let g:taskwiki_markup_syntax="{0}"'.format(self.markup)) def setup(self):