Skip to content

Commit 8cda3f7

Browse files
jsmnbomEldinnie
authored andcommitted
Turn on branch coverage (python-telegram-bot#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
1 parent d7929a8 commit 8cda3f7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ script:
3434
- pytest -v --cov=telegram
3535

3636
after_success:
37-
coveralls
37+
- coverage combine
38+
- coveralls

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ filterwarnings =
2626
ignore::DeprecationWarning
2727

2828
[coverage:run]
29-
branch = False
29+
branch = True
3030
source = telegram
31+
parallel = True
32+
concurrency = thread, multiprocessing
3133
omit =
3234
tests/
3335
telegram/__main__.py

tests/test_meta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def call_pre_commit_hook(hook_id):
2828
__tracebackhide__ = True
29-
return subprocess.call(['pre-commit', 'run', '--all-files', hook_id])
29+
return os.system(' '.join(['pre-commit', 'run', '--all-files', hook_id]))
3030

3131

3232
@pytest.mark.parametrize('hook_id', argvalues=('yapf', 'flake8', 'pylint'))
@@ -39,4 +39,4 @@ def test_pre_commit_hook(hook_id):
3939

4040

4141
def test_build():
42-
assert subprocess.call(['python', 'setup.py', 'bdist_dumb']) == 0
42+
assert os.system('python setup.py bdist_dumb') == 0

0 commit comments

Comments
 (0)