1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00

samba.tests.docs: Distinguish between unknown and undocumened parameters.

This commit is contained in:
Jelmer Vernooij
2012-09-26 18:41:19 +02:00
parent d2f8fe855d
commit d0e644e0c8

View File

@ -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,