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'.
  get_configuration_file(path)
Return the configuration file for the 'Database' rooted at 'path'.
  is_database(db_path)
Returns true if 'db_path' looks like a test database.
  load_database(db_path)
Load the database from 'db_path'.
  set_path(path)
Set the database path to be used when the database is loaded.
  get_database()
Returns the global Database object.

Variables [hide private]
__the_database The global 'Database' object.
__the_db_path The path to the database.
nested_scopes  

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.

is_database(db_path)

source code 
Returns true if 'db_path' looks like a test database.

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.

Variables Details [hide private]

__the_database

The global 'Database' object.
Value:
{}                                                                     
      

__the_db_path

The path to the database.
Value:
'.'                                                                    
      

nested_scopes

Value:
_Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'alpha', 0), 16)