plexus.config.test_loader module

Tests for Plexus configuration loader.

class plexus.config.test_loader.TestConfigLoader

Bases: object

Test cases for ConfigLoader class.

setup_method()

Set up test fixtures.

teardown_method()

Clean up after tests.

test_change_working_directory(mock_expanduser, mock_isdir, mock_chdir)

Test changing working directory.

test_change_working_directory_missing(mock_expanduser, mock_isdir, mock_chdir)

Test changing to non-existent working directory.

test_current_directory_vs_home_directory_precedence()

Test that current directory config takes precedence over home directory.

test_discover_config_sources()

Test configuration source discovery.

test_environment_variable_precedence()

Test that environment variables take precedence over YAML config.

test_get_available_sources()

Test getting available configuration sources.

test_get_config_value()

Test getting configuration values after loading.

test_get_nested_value()

Test getting nested values from configuration.

test_init()

Test ConfigLoader initialization.

test_load_config_multiple_files(mock_load_yaml)

Test loading and merging configuration from multiple files.

test_load_config_no_files()

Test loading configuration when no files exist.

test_load_config_single_file(mock_load_yaml)

Test loading configuration from a single file.

test_load_yaml_file()

Test loading YAML configuration files.

test_load_yaml_file_missing()

Test loading non-existent YAML file.

test_load_yaml_file_yml_extension()

Test loading YAML configuration files with .yml extension.

test_merge_configs()

Test merging configuration dictionaries.

test_missing_config_files()

Test behavior when no config files exist.

test_set_environment_variables()

Test setting environment variables from configuration.

test_set_environment_variables_no_working_dir_change()

Test setting environment variables when working directory change fails.

test_set_nested_value()

Test setting nested values in configuration.

test_yaml_vs_yml_extension_precedence()

Test that .yaml extension takes precedence over .yml in same directory.

class plexus.config.test_loader.TestEnvironmentVariableMapping

Bases: object

Test environment variable mapping completeness.

test_env_var_mapping_completeness()

Test that all important environment variables are mapped.

test_yaml_key_format()

Test that YAML keys follow consistent naming conventions.

class plexus.config.test_loader.TestLoadConfigFunction

Bases: object

Test the convenience load_config function.

setup_method()

Set up test fixtures.

teardown_method()

Clean up after tests.

test_load_config_function(mock_load_config)

Test the convenience load_config function.