From 6cd0c14c02e0570e862d49b0adb6cbdd70bfb1fb Mon Sep 17 00:00:00 2001 From: Eldinnie Date: Fri, 1 Sep 2017 08:40:52 +0200 Subject: [PATCH] Show what parameter/attribute is missing in test_offical (#808) * Show what parameter/attribute is missing in test_offical * Only run test_official on py3.6 Down from 3.5 and 3.6 --- tests/test_official.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_official.py b/tests/test_official.py index 8e106cbac..69a542999 100644 --- a/tests/test_official.py +++ b/tests/test_official.py @@ -65,7 +65,8 @@ def check_method(h4): checked = [] for parameter in table: param = sig.parameters.get(parameter.Parameters) - assert param is not None + assert param is not None, "Parameter {} not found in {}".format(parameter.Parameters, + method.__name__) # TODO: Check type via docstring # TODO: Check if optional or required checked.append(parameter.Parameters) @@ -106,7 +107,7 @@ def check_object(h4): continue param = sig.parameters.get(field) - assert param is not None + assert param is not None, "Attribute {} not found in {}".format(field, obj.__name__) # TODO: Check type via docstring # TODO: Check if optional or required checked.append(field) @@ -149,7 +150,7 @@ for thing in soup.select('h4 > a.anchor'): @pytest.mark.parametrize(('method', 'data'), argvalues=argvalues, ids=names) -@pytest.mark.skipif(not sys.version_info >= (3, 5) or python_implementation() != 'CPython', +@pytest.mark.skipif(not sys.version_info >= (3, 6) or python_implementation() != 'CPython', reason='follow_wrapped (inspect.signature) is not supported on this platform') def test_official(method, data): method(data)