Merge pull request #5747 from blueyed/coveragerc-report

.coveragerc: add report section
This commit is contained in:
Anthony Sottile
2019-08-15 16:52:43 -07:00
committed by GitHub
2 changed files with 18 additions and 10 deletions

View File

@@ -16,3 +16,11 @@ source = src/
*/lib/python*/site-packages/
*/pypy*/site-packages/
*\Lib\site-packages\
[report]
skip_covered = True
show_missing = True
exclude_lines =
\#\s*pragma: no cover
^\s*raise NotImplementedError\b
^\s*return NotImplemented\b

View File

@@ -14,22 +14,22 @@ def test_getfuncargnames_functions():
"""Test getfuncargnames for normal functions"""
def f():
pass
raise NotImplementedError()
assert not fixtures.getfuncargnames(f)
def g(arg):
pass
raise NotImplementedError()
assert fixtures.getfuncargnames(g) == ("arg",)
def h(arg1, arg2="hello"):
pass
raise NotImplementedError()
assert fixtures.getfuncargnames(h) == ("arg1",)
def j(arg1, arg2, arg3="hello"):
pass
raise NotImplementedError()
assert fixtures.getfuncargnames(j) == ("arg1", "arg2")
@@ -39,7 +39,7 @@ def test_getfuncargnames_methods():
class A:
def f(self, arg1, arg2="hello"):
pass
raise NotImplementedError()
assert fixtures.getfuncargnames(A().f) == ("arg1",)
@@ -50,7 +50,7 @@ def test_getfuncargnames_staticmethod():
class A:
@staticmethod
def static(arg1, arg2, x=1):
pass
raise NotImplementedError()
assert fixtures.getfuncargnames(A.static, cls=A) == ("arg1", "arg2")
@@ -60,7 +60,7 @@ def test_getfuncargnames_partial():
import functools
def check(arg1, arg2, i):
pass
raise NotImplementedError()
class T:
test_ok = functools.partial(check, i=2)
@@ -74,7 +74,7 @@ def test_getfuncargnames_staticmethod_partial():
import functools
def check(arg1, arg2, i):
pass
raise NotImplementedError()
class T:
test_ok = staticmethod(functools.partial(check, i=2))
@@ -3355,7 +3355,7 @@ class TestShowFixtures:
@pytest.fixture
@pytest.fixture
def foo():
pass
raise NotImplementedError()
class TestContextManagerFixtureFuncs:
@@ -3981,7 +3981,7 @@ def test_call_fixture_function_error():
@pytest.fixture
def fix():
return 1
raise NotImplementedError()
with pytest.raises(pytest.fail.Exception):
assert fix() == 1