1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 from qm.test.suite import *
21
22
23
24
25
27 """A 'DirectorySuite' is a suite corresponding to a directory.
28
29 A 'DirectorySuite' is an implicit suite that contains all tests
30 within a given directory. The directory is given by a label, not
31 a file system directory, so a 'DirectorySuite' can work with any
32 database."""
33
34 - def __init__(self, database, directory):
35 """Construct a new 'DirectorySuite'.
36
37 'database' -- The 'Database' instance containing this suite.
38
39 'directory' -- A label giving the directory corresponding to
40 this suite."""
41
42
43 super(DirectorySuite, self).__init__({},
44 qmtest_id = directory,
45 qmtest_database = database)
46
47
49 """Return the tests contained in this suite.
50
51 returns -- A sequence of labels corresponding to the tests
52 contained in this suite. Tests that are contained in this suite
53 only because they are contained in a suite which is itself
54 contained in this suite are not returned."""
55
56 return self.GetDatabase().GetTestIds(self.GetId(), scan_subdirs=0)
57
58
60 """Return the suites contained in this suite.
61
62 returns -- A sequence of labels corresponding to the suites
63 contained in this suite. Suites that are contained in this
64 suite only because they are contained in a suite which is itself
65 contained in this suite are not returned."""
66
67 return self.GetDatabase().GetSuiteIds(self.GetId(), scan_subdirs=0)
68
69
73
74
75
76
77
78
79
80