Stores command line options and configuration file keys. More...
Public Member Functions | |
def | __init__ (self, options, cp) |
def | get_option (self, name, default=None, required=False, section=None) |
Get configuration file keys in a safe way. More... | |
Public Attributes | |
options | |
optparse.Values: command line options | |
cp | |
ConfigParser: configuration file keys. | |
test | |
The name of the current test. | |
Stores command line options and configuration file keys.
Each OptionsManager instance has its own section in the configuration file, named after the current test name (OptionsManager::test). If the current section has the key import=othersection
, import all keys from othersection
if they are not present already (works recursively). Values which end in _local
are never imported.
Command line options this class understands.
Definition at line 100 of file testdriver.py.
def __init__ | ( | self, | |
options, | |||
cp | |||
) |
options | optparse.Values: object holding all the command line options. |
cp | ConfigParser: ConfigParser instance holding all configuration file keys. |
Definition at line 120 of file testdriver.py.
def get_option | ( | self, | |
name, | |||
default = None , |
|||
required = False , |
|||
section = None |
|||
) |
Get configuration file keys in a safe way.
name | Name of the key. |
default | Default value to return if key does not exist. |
required | Fail if True and key does not exist. |
section | The section name to look in, defaults to OptionsManager::test if None. |
This methods looks up the key name
in the section name OptionsManager::test.
Definition at line 144 of file testdriver.py.