selftest.testlist: Add docstrings.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 4 Mar 2012 03:19:26 +0000 (04:19 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 4 Mar 2012 17:02:07 +0000 (18:02 +0100)
selftest/testlist.py

index 276b51b812162d1c7ed704b506a46e339ed4de90..a68a9b8ab98cafcdb2098ca8dbaf1d8fabc6dbd7 100644 (file)
@@ -92,12 +92,20 @@ def read_restricted_test_list(f):
 
 
 class RestrictedTestManager(object):
+    """Test manager which can filter individual tests that should be run."""
 
     def __init__(self, test_list):
         self.test_list = test_list
         self.unused = set(self.test_list)
 
     def should_run_testsuite(self, name):
+        """Determine whether a testsuite should be run.
+
+        :param name: Name of the testsuite
+        :return: None if full testsuite should be run,
+            a list of subtests to run or [] if it should
+            not be run.
+        """
         match = []
         for r in self.test_list:
             if r == name:
@@ -112,4 +120,8 @@ class RestrictedTestManager(object):
         return match
 
     def iter_unused(self):
+        """Iterate over entry entries that were unused.
+
+        :return: Iterator over test list entries that were not used.
+        """
         return iter(self.unused)