Package qm :: Package test :: Module database
[hide private]
[frames] | no frames]

Module database

source code

Classes [hide private]
  ItemDescriptor
An 'ItemDescriptor' describes a test, resource, or similar entity.
  TestDescriptor
A test instance.
  ResourceDescriptor
A resource instance.
  DatabaseError
An exception relating to a 'Database'.
  NoSuchItemError
An exception indicating that a particular item could not be found.
  NoSuchTestError
The specified test does not exist.
  NoSuchSuiteError
The specified suite does not exist.
  NoSuchResourceError
The specified resource does not exist.
  Database
A 'Database' stores tests, testsuites, and resources.
Functions [hide private]
 
get_configuration_directory(path)
Return the configuration directory for the 'Database' rooted at 'path'.
source code
 
get_configuration_file(path)
Return the configuration file for the 'Database' rooted at 'path'.
source code
 
is_database(db_path)
Returns true if 'db_path' looks like a test database.
source code
 
load_database(db_path)
Load the database from 'db_path'.
source code
 
set_path(path)
Set the database path to be used when the database is loaded.
source code
 
get_database()
Returns the global Database object.
source code
Variables [hide private]
  __the_database = None
The global 'Database' object.
  __the_db_path = '.'
The path to the database.
  __package__ = 'qm.test'
Function Details [hide private]

get_configuration_directory(path)

source code 

Return the configuration directory for the 'Database' rooted at 'path'.

'path' -- The path to the test database.

returns -- The path to the configuration directory.

get_configuration_file(path)

source code 

Return the configuration file for the 'Database' rooted at 'path'.

'path' -- The path to the test database.

returns -- The path to the configuration file.

load_database(db_path)

source code 

Load the database from 'db_path'.

'db_path' -- The path to the directory containing the database.

returns -- The new 'Database'.

set_path(path)

source code 

Set the database path to be used when the database is loaded.

'path' -- A string containing the path to the database.

get_database()

source code 

Returns the global Database object.

returns -- The 'Database' object that corresponds to the currently executing process. It may be None.