Table of Contents

Class: MountDatabase qm/test/classes/mount_database.py

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.

Base Classes   
Database
Methods   
GetClassPaths
GetIds
GetResource
GetSubdirectories
GetSuite
GetTest
_AdjustResources
_GetContainedItem
_SelectDatabase
__init__
  GetClassPaths 
GetClassPaths ( self )

  GetIds 
GetIds (
        self,
        kind,
        directory="",
        scan_subdirs=1,
        )

  GetResource 
GetResource ( self,  resource_id )

  GetSubdirectories 
GetSubdirectories ( self,  directory )

  GetSuite 
GetSuite ( self,  suite_id )

  GetTest 
GetTest ( self,  test_id )

  _AdjustResources 
_AdjustResources (
        self,
        joiner,
        arguments,
        )

Adjust the resource IDs stored in the arguments.

joiner
A function of one argument which prepends the label for a mount point to the label it is given.
arguments
The arguments to a test or resource class.

Modifies the arguments to contain resource names that are relative to the containing database.

  _GetContainedItem 
_GetContainedItem (
        self,
        kind,
        item_id,
        )

Return item_id from a mounted database.

kind
The kind of item to return.
item_id
The name of the item, in the containing database.
returns
A tuple '(joiner, item). The item will be from one of the mounted databases. joiner is a function of one argument which prepends the mount point to its argument.
Exceptions   
Database._item_exceptions [ kind ]( item_id )
  _SelectDatabase 
_SelectDatabase ( self,  item_id )

Return the contained database in which item_id can be found.

item_id
The name of an item in this database.
returns
A tuple (database, joiner, id) where database is a Database, joiner is a function of one argument which prepends the mount point to a label, and id is the portion of item_id that remains after stripping off the mount point of database. If item_id does not correspond to any mount point, an exception is raised.
  __init__ 
__init__ (
        self,
        path,
        arguments,
        )

Exceptions   
QMException, "mounted databases use differing label classes"

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1