« Previous | Next » 

Revision 8a96c5a6

ID8a96c5a6122a2d6f75d8f2183c96ac65cc5e58f7
Parent f9329a6c
Child a08e181f

Added by Michael Hanselmann over 8 years ago

Refactor QA configuration code

Ever since its introduction (sometime before commit cec9845 in September
2007), the QA configuration was stored in a dictionary at module-level
in “qa/qa_config.py”. The configuration was loaded, verified and
evaluated using module-level functions. Since then the configuration has
become more complicated and more functionality has been added. This
patch refactors handling the configuration to use a class and provides
unittests.

- The configuration is loaded through a class method which also verifies
it for consistency
- Wrapper methods are provided in “qa_config” to not change the
interface
- Unit tests are provided for the new configuration class
- The configuration object is still stored in a module-level variable
and can be retrieved using “GetConfig” (direct access should be
avoided so an uninitialized configuration can be detected)

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences