コード例 #1
0
 def test_anchor_merge_mode_ini(self, quiet_logger, tmp_path_factory,
                                setting, mode):
     config_file = create_temp_yaml_file(
         tmp_path_factory, """
     [defaults]
     anchors = {}
     """.format(setting))
     mc = MergerConfig(quiet_logger,
                       SimpleNamespace(config=config_file, anchors=None))
     assert mc.anchor_merge_mode() == mode
コード例 #2
0
 def test_anchor_merge_mode_cli_overrides_ini(self, quiet_logger,
                                              tmp_path_factory, cli, ini,
                                              mode):
     config_file = create_temp_yaml_file(
         tmp_path_factory, """
     [defaults]
     anchors = {}
     """.format(ini))
     mc = MergerConfig(quiet_logger,
                       SimpleNamespace(config=config_file, anchors=cli))
     assert mc.anchor_merge_mode() == mode
コード例 #3
0
 def test_anchor_merge_mode_cli(self, quiet_logger, setting, mode):
     mc = MergerConfig(quiet_logger, SimpleNamespace(anchors=setting))
     assert mc.anchor_merge_mode() == mode
コード例 #4
0
 def test_anchor_merge_mode_default(self, quiet_logger):
     mc = MergerConfig(quiet_logger, SimpleNamespace(anchors=None))
     assert mc.anchor_merge_mode() == AnchorConflictResolutions.STOP