Skip to content

Commit 416a04f

Browse files
committed
Add coverage to tox.ini
Fail test if coverage goes below 80% for files under plugin/vimliq
1 parent 621d0f9 commit 416a04f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

plugin/tests/test_clientmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_ClientManager_add_client(
4747
assert not client_manager.clients
4848
client_manager.add_client()
4949
assert client_manager.clients["python"]
50-
mock_.assert_called_once_with(expected, "trans")
50+
mock_.assert_called_once_with(expected, "trans", use_signs=False)
5151
mock_().start_server.assert_called_once_with()
5252

5353

plugin/tox.ini

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
skipsdist=True
3-
envlist = py27,py34,py36,lint
3+
envlist = py27,py34,py36,lint,coverage
44
skip_missing_interpreters=True
55

66
[testenv]
@@ -20,3 +20,12 @@ commands =
2020
install_lsp_servers.py
2121
deps =
2222
flake8
23+
24+
[testenv:coverage]
25+
basepython = python
26+
commands =
27+
py.test --cov-fail-under 80 --cov vimliq tests/
28+
deps =
29+
pytest
30+
mock
31+
pytest-cov

0 commit comments

Comments
 (0)