summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 04:19:26 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:07 +0100
commitd400619deec2bae2c9b394c72c20edfd46e4d197 (patch)
tree3612071cac0919c70468e580f905f00584580fa6 /selftest
parenta50def839c9ead7f05ea90c093a64794f79ed243 (diff)
downloadsamba-d400619deec2bae2c9b394c72c20edfd46e4d197.tar.gz
samba-d400619deec2bae2c9b394c72c20edfd46e4d197.tar.bz2
samba-d400619deec2bae2c9b394c72c20edfd46e4d197.zip
selftest.testlist: Add docstrings.
Diffstat (limited to 'selftest')
-rw-r--r--selftest/testlist.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/selftest/testlist.py b/selftest/testlist.py
index 276b51b812..a68a9b8ab9 100644
--- a/selftest/testlist.py
+++ b/selftest/testlist.py
@@ -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)