tests.unit_tests.config.core.test_config_group#

Functions

multi_tier_test_group

A nested test instance of :class: ~yawning_titan.config.core.ConfigGroup.

test_create_from_legacy

Test the group can be created using legacy config names.

test_group

A test instance of :class: ~yawning_titan.config.core.ConfigGroup.

test_multi_tier_group_tier_1_item_failed

Test the element and group validation works for groups with multiple nested tiers.

test_multi_tier_group_tier_1_validation_group_failed

Test the element and group validation works for groups with multiple nested tiers.

test_multi_tier_group_tier_2_item_failed

Test the element and group validation works for groups with multiple nested tiers.

test_multi_tier_group_tier_2_validation_group_failed

Test the element and group validation works for groups with multiple nested tiers.

test_multi_tier_group_validation_passed

Test the element and group validation works for groups with multiple nested tiers.

test_repeat_group_validation

Test validating a group then modifying its sub-groups and re-validating.

test_repeat_item_validation

Test validating a group then modifying its items and re-validating.

test_set_config_item_to_value

Test the to_dict method produces a dictionary with the values as set.

test_stringify

Test the group can represent itself as a string.

test_to_dict

Test the to_dict method produces a dictionary with the values as set.

test_yaml_round_trip

Test that the items can be stored in a yaml file and subsequently reloaded.

Classes

Group

Basic implementation of a :class: ~yawning_titan.config.core.ConfigGroup.

GroupTier1

Basic implementation of a nested :class: ~yawning_titan.config.core.ConfigGroup.

GroupTier2

Basic implementation of a nested :class: ~yawning_titan.config.core.ConfigGroup.

class tests.unit_tests.config.core.test_config_group.Group(doc=None)[source]#

Basic implementation of a :class: ~yawning_titan.config.core.ConfigGroup.

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

__init__(doc=None)[source]#

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

class tests.unit_tests.config.core.test_config_group.GroupTier1(doc=None)[source]#

Basic implementation of a nested :class: ~yawning_titan.config.core.ConfigGroup.

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

__init__(doc=None)[source]#

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

validate()[source]#

Extend the parent validation with additional rules specific to this :class: ~yawning_titan.config.core.ConfigGroup.

class tests.unit_tests.config.core.test_config_group.GroupTier2(doc=None)[source]#

Basic implementation of a nested :class: ~yawning_titan.config.core.ConfigGroup.

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

__init__(doc=None)[source]#

The ConfigGroup constructor.

Parameters:

doc – The groups doc.

validate()[source]#

Extend the parent validation with additional rules specific to this :class: ~yawning_titan.config.core.ConfigGroup.

tests.unit_tests.config.core.test_config_group.test_group()[source]#

A test instance of :class: ~yawning_titan.config.core.ConfigGroup.

tests.unit_tests.config.core.test_config_group.multi_tier_test_group()[source]#

A nested test instance of :class: ~yawning_titan.config.core.ConfigGroup.

tests.unit_tests.config.core.test_config_group.test_to_dict(test_group)[source]#

Test the to_dict method produces a dictionary with the values as set.

tests.unit_tests.config.core.test_config_group.test_set_config_item_to_value(test_group)[source]#

Test the to_dict method produces a dictionary with the values as set.

tests.unit_tests.config.core.test_config_group.test_create_from_legacy(test_group)[source]#

Test the group can be created using legacy config names.

tests.unit_tests.config.core.test_config_group.test_stringify(test_group)[source]#

Test the group can represent itself as a string.

The string should contain the groups class name, the validation failure reasons and exceptions together with the names and values of each of its elements. This should all be wrapped in parentheses.

tests.unit_tests.config.core.test_config_group.test_repeat_item_validation(test_group)[source]#

Test validating a group then modifying its items and re-validating.

tests.unit_tests.config.core.test_config_group.test_repeat_group_validation(multi_tier_test_group)[source]#

Test validating a group then modifying its sub-groups and re-validating.

tests.unit_tests.config.core.test_config_group.test_multi_tier_group_validation_passed(multi_tier_test_group)[source]#

Test the element and group validation works for groups with multiple nested tiers.

tests.unit_tests.config.core.test_config_group.test_multi_tier_group_tier_1_validation_group_failed(multi_tier_test_group)[source]#

Test the element and group validation works for groups with multiple nested tiers.

tests.unit_tests.config.core.test_config_group.test_multi_tier_group_tier_2_validation_group_failed(multi_tier_test_group)[source]#

Test the element and group validation works for groups with multiple nested tiers.

tests.unit_tests.config.core.test_config_group.test_multi_tier_group_tier_2_item_failed(multi_tier_test_group)[source]#

Test the element and group validation works for groups with multiple nested tiers.

tests.unit_tests.config.core.test_config_group.test_multi_tier_group_tier_1_item_failed(multi_tier_test_group)[source]#

Test the element and group validation works for groups with multiple nested tiers.

tests.unit_tests.config.core.test_config_group.test_yaml_round_trip(test_group, tmp_path)[source]#

Test that the items can be stored in a yaml file and subsequently reloaded.