| Home | Trees | Index | Help |
|---|
| Package qm :: Package test :: Package classes :: Module mount_database :: Class MountDatabase |
|
object--+ |Extension--+ |Database--+ | MountDatabase
A 'MountDatabase' contains other databases.
Every contained database has a "mount point", which is a label giving the root of the database. A test with the ID "x" in a database with a mount point of "y" has the ID "x.y" in the containing database.
The contained databases are found by looking for subdirectories of the 'MountDatabase' directory. Every immediate subdirectory which is itself a QMTest database is mounted; its mount point is the name of the subdirectory.| Method Summary | |
|---|---|
__init__(self,
path,
arguments)
| |
Return directories to search for test and resource classes. | |
Return all IDs of the indicated 'kind' that begin with 'directory'. | |
Return the 'ResourceDescriptor' for the resource 'resouce_id'. | |
Return the immediate subdirectories of 'directory'. | |
Return the 'Suite' for the suite named 'suite_id'. | |
Return the 'TestDescriptor' for the test named 'test_id'. | |
| Inherited from Database | |
Expand test and suite IDs into test IDs. | |
Returns the 'AttachmentStore' associated with the database. | |
Return the directory containing configuration information. | |
Return the extension object named 'id'. | |
Return the extensions in 'directory'. | |
Return the item of the indicated 'kind' with indicated 'item_id'. | |
Return all of the component directories of 'label'. | |
Return the directory containing the database. | |
Return the kinds of resources that the database can store. | |
Return all resource IDs that begin with 'directory'. | |
Return all suite IDs that begin with 'directory'. | |
Return the kinds of tests that the database can store. | |
Return all test IDs that begin with 'directory'. | |
Check whether or not the database has a resource named 'resource_id'. | |
Check whether or not the database has a suite named 'suite_id'. | |
Check whether or not the database has a test named 'test_id'. | |
Returns true iff this database is modifiable. | |
Return true if 'label' is valid. | |
Join the 'labels' together. | |
Remove the extension 'id' from the database. | |
Split the label into a pair '(directory, basename)'. | |
Split the label into a pair '(parent, subpath)'. | |
Store 'extension' in the database, using the name 'id'. | |
| Inherited from Extension | |
| |
Return the name of the extension class. | |
Return the arguments to this extension instance. | |
Create a DOM document for 'self'. | |
Create a DOM node for 'self'. | |
Write an XML description of 'self' to a file. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Class Variable Summary | |
|---|---|
str |
label_class = 'python_label.PythonLabel'
|
str |
modifiable = 'true'
|
Type |
MountedSuite = qm.test.classes.mount_database.MountedSuite |
NoneType |
mounts = None |
| Inherited from Database | |
list |
arguments = [<<class 'qm.fields.TextField'> label_class>...
|
list |
ITEM_KINDS = ['resource', 'suite', 'test']
|
str |
kind = 'database'
|
str |
RESOURCE = 'resource'
|
str |
SUITE = 'suite'
|
str |
TEST = 'test'
|
| Method Details |
|---|
GetClassPaths(self)Return directories to search for test and resource classes. returns -- A sequence of strings. Each string is a directory that should be searched to locate test and resource classes. The directories will be searched in the order they appear. QMTest will search other directories (like those in the 'QMTEST_CLASS_PATH' environment variable) in addition to these directories. For a given database, this method should always return the same value; callers are permitted to cache the value returned. Derived classes may override this method. The sequence returned by the derived class need not be a superset of the value returned by the default implementation (but probably should be).
|
GetIds(self, kind, directory='', scan_subdirs=1)Return all IDs of the indicated 'kind' that begin with 'directory'. 'kind' -- One of the 'ITEM_KINDS'. 'directory' -- A label indicating the directory in which to begin the search. 'scan_subdirs' -- True if (and only if) subdirectories of 'directory' should be scanned. returns -- A list of all items of the indicated 'kind' located within 'directory', as absolute labels. Derived classes may override this method.
|
GetResource(self, resource_id)Return the 'ResourceDescriptor' for the resource 'resouce_id'. 'resource_id' -- A label naming the resource. returns -- A 'ResourceDescriptor' corresponding to 'resource_id'. raises -- 'NoSuchResourceError' if there is no resource in the database named 'resource_id'.
|
GetSubdirectories(self, directory)Return the immediate subdirectories of 'directory'. 'directory' -- A label indicating a directory in the database. returns -- A sequence of (relative) labels indictating the immediate subdirectories of 'directory'. For example, if "a.b" and "a.c" are directories in the database, this method will return "b" and "c" given "a" as 'directory'. Derived classes may override this method.
|
GetSuite(self, suite_id)Return the 'Suite' for the suite named 'suite_id'. 'suite_id' -- A label naming the suite. returns -- An instance of 'Suite' (or a derived class of 'Suite') corresponding to 'suite_id'. raises -- 'NoSuchSuiteError' if there is no test in the database named 'test_id'. All databases must have an implicit suite called '' that contains all tests in the database. More generally, for each directory in the database, there must be a corresponding suite that contains all tests in that directory and its subdirectories.
|
GetTest(self, test_id)Return the 'TestDescriptor' for the test named 'test_id'. 'test_id' -- A label naming the test. returns -- A 'TestDescriptor' corresponding to 'test_id'. raises -- 'NoSuchTestError' if there is no test in the database named 'test_id'.
|
| Class Variable Details |
|---|
label_class
|
modifiable
|
mounts
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Sep 27 15:49:07 2007 | http://epydoc.sf.net |