From d0e644e0c83636b4e4c6b52ce0f861ffe38cedeb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 26 Sep 2012 18:41:19 +0200 Subject: samba.tests.docs: Distinguish between unknown and undocumened parameters. --- source4/scripting/python/samba/tests/docs.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/tests/docs.py b/source4/scripting/python/samba/tests/docs.py index 1ab3e55b81..3e508ebf66 100644 --- a/source4/scripting/python/samba/tests/docs.py +++ b/source4/scripting/python/samba/tests/docs.py @@ -76,14 +76,22 @@ def get_implementation_parameters(sourcedir): class SmbDotConfTests(TestCase): - def test_missing(self): + def test_unknown(self): topdir = samba.source_tree_topdir() documented = set(get_documented_parameters(topdir)) parameters = set(get_implementation_parameters(topdir)) + # Filter out parametric options, since we can't find them in the parm + # table + documented = set([p for p in documented if not ":" in p]) unknown = documented.difference(parameters) if len(unknown) > 0: self.fail(self._format_message(unknown, "Parameters that are documented but not in the implementation:")) + + def test_undocumented(self): + topdir = samba.source_tree_topdir() + documented = set(get_documented_parameters(topdir)) + parameters = set(get_implementation_parameters(topdir)) undocumented = parameters.difference(documented) if len(undocumented) > 0: self.fail(self._format_message(undocumented, -- cgit