tests.test_config moduleΒΆ
Configuration file loading, validation and export.
- tests.test_config.make_config(tmp_path)[source]ΒΆ
Write a TOML configuration file and return its path as a string.
- tests.test_config.test_config_file_drives_run(invoke, make_box, make_config)[source]ΒΆ
Strategy, action and dry-run picked up from a configuration file.
- tests.test_config.test_config_regexps_list(invoke, make_box, make_config)[source]ΒΆ
The
regexpskey holds the ordered list of--regexpexpressions.
- tests.test_config.test_config_regexps_number(invoke, make_box, make_config)[source]ΒΆ
A number in the
regexpslist works as an expression, as a string does.TOML reads a bare year as an integer, where the command line passes text.
- tests.test_config.test_config_kebab_case_keys(invoke, make_box, make_config)[source]ΒΆ
Kebab-case keys, the TOML convention matching the CLI flags, are accepted.
- tests.test_config.test_config_unknown_key_rejected(invoke, make_box, make_config)[source]ΒΆ
A typo in the configuration file aborts the run instead of being ignored.
- tests.test_config.test_config_preset(invoke, make_box, make_config)[source]ΒΆ
A preset picked up from a configuration file applies its options.
- tests.test_config.test_config_value_overrides_a_preset(invoke, make_box, make_config)[source]ΒΆ
A configuration file value overrides the preset, and the run says so.
A forgotten key would otherwise change a run that reads as conservative.
- tests.test_config.test_config_mail_sources_blocked(invoke, make_box, make_config)[source]ΒΆ
Mail sources are command-line only: a config file cannot point at boxes.
- tests.test_config.test_config_values_checked(invoke, make_box, make_config, setting, message)[source]ΒΆ
Config-sourced values go through the checks of command-line ones.
- tests.test_config.test_cli_overrides_config(invoke, make_config)[source]ΒΆ
Command-line values take precedence over configuration file values.
- tests.test_config.test_pyproject_autodiscovery(invoke, make_box, monkeypatch, tmp_path)[source]ΒΆ
A pyproject.toml with a [tool.mdedup] section is discovered from cwd.