Turn on branch coverage (#790)

* Run pre commit hook tests on all platforms TEMPORARILY

* Use os.system instead of subprocess.call

* Turn on branch coverage

* Let's try this then

* More testing!

* Update test_meta.py
This commit is contained in:
Jacob Bom 2017-09-01 08:44:45 +02:00 committed by Eldinnie
parent d7929a8de4
commit 8cda3f7a71
3 changed files with 7 additions and 4 deletions

View file

@ -34,4 +34,5 @@ script:
- pytest -v --cov=telegram - pytest -v --cov=telegram
after_success: after_success:
coveralls - coverage combine
- coveralls

View file

@ -26,8 +26,10 @@ filterwarnings =
ignore::DeprecationWarning ignore::DeprecationWarning
[coverage:run] [coverage:run]
branch = False branch = True
source = telegram source = telegram
parallel = True
concurrency = thread, multiprocessing
omit = omit =
tests/ tests/
telegram/__main__.py telegram/__main__.py

View file

@ -26,7 +26,7 @@ import pytest
def call_pre_commit_hook(hook_id): def call_pre_commit_hook(hook_id):
__tracebackhide__ = True __tracebackhide__ = True
return subprocess.call(['pre-commit', 'run', '--all-files', hook_id]) return os.system(' '.join(['pre-commit', 'run', '--all-files', hook_id]))
@pytest.mark.parametrize('hook_id', argvalues=('yapf', 'flake8', 'pylint')) @pytest.mark.parametrize('hook_id', argvalues=('yapf', 'flake8', 'pylint'))
@ -39,4 +39,4 @@ def test_pre_commit_hook(hook_id):
def test_build(): def test_build():
assert subprocess.call(['python', 'setup.py', 'bdist_dumb']) == 0 assert os.system('python setup.py bdist_dumb') == 0