Complete the set of unit tests for the config.py python script.
- Complete the set of unit tests for
src/swatch/config.py
. Following up on !110 (merged).- The following iteration includes unit tests for
LinkModeManager
class andexpand_link_id()
,parse_index_list_string()
andparse_system_file()
functions.
- The following iteration includes unit tests for
- As an auxiliary task, developed test suite for
src/swatch/io_settings.py
attests/io_settings
. -
pytest
andcheck
packages have been used to develop the unit tests. - Updated exceptions from
RuntimeError
toInvalidConfigFormatError
for all instances. - Raises issue #51 .
The following set of general rules were followed while developing the unit tests.
- The test suite for any particular script is developed in a dedicated directory under
tests/<PY_FILE_NAME>/
. The corresponding data used by the tests are stored intests/<PY_FILE_NAME>/references/
.- In this case these directories are
tests/config/
andtests/config/references
.
- In this case these directories are
- Test scripts for classes are named as test_CLASS_NAME.py while test scripts for non-internal functions are named as test_FUNCTION_NAME__.py.
- The internal functions do not have dedicated test scripts for them but they are unit tested through the functions or classes that call them.
Edited by Abanti Ranadhir Sahasransu