diff options
| author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-07-02 14:20:52 +0100 |
|---|---|---|
| committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2019-07-15 07:40:32 +0000 |
| commit | eff4f4522dfb4af1fdd8fbca7aa0e50d75d98960 (patch) | |
| tree | c4d8b5b4a1bd93ddf57dbaa9133cf0ec3651aa40 | |
| parent | 4936fc182dff54292301d5b953574db05985ba9b (diff) | |
| download | buildstream-eff4f4522dfb4af1fdd8fbca7aa0e50d75d98960.tar.gz | |
tests/yaml: Stop using 'composite_dict' and use 'composite' instead
'composite_dict' is a more internal method and we don't really need to
access it there
| -rw-r--r-- | src/buildstream/testing/runcli.py | 2 | ||||
| -rw-r--r-- | tests/internals/yaml.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py index 89d4f4a2f..c395aed38 100644 --- a/src/buildstream/testing/runcli.py +++ b/src/buildstream/testing/runcli.py @@ -573,7 +573,7 @@ class CliIntegration(Cli): project_config = _yaml.load(temp_project) - _yaml.composite_dict(base_config, project_config) + _yaml.composite(base_config, project_config) _yaml.roundtrip_dump(base_config, project_filename) diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py index 90f2a39f8..0432a0a84 100644 --- a/tests/internals/yaml.py +++ b/tests/internals/yaml.py @@ -183,7 +183,7 @@ def test_composite_preserve_originals(datafiles): base = _yaml.load(filename) overlay = _yaml.load(overlayfile) base_copy = base.copy() - _yaml.composite_dict(base_copy, overlay) + _yaml.composite(base_copy, overlay) copy_extra = base_copy.get_mapping('extra') orig_extra = base.get_mapping('extra') @@ -249,7 +249,7 @@ def test_list_composition(datafiles, filename, tmpdir, base = _yaml.load(base_file, 'basics.yaml') overlay = _yaml.load(overlay_file, shortname=filename) - _yaml.composite_dict(base, overlay) + _yaml.composite(base, overlay) children = base.get_sequence('children') assert len(children) == length @@ -267,7 +267,7 @@ def test_list_deletion(datafiles): base = _yaml.load(base, shortname='basics.yaml') overlay = _yaml.load(overlay, shortname='listoverwriteempty.yaml') - _yaml.composite_dict(base, overlay) + _yaml.composite(base, overlay) children = base.get_sequence('children') assert not children @@ -384,8 +384,8 @@ def test_list_composition_twice(datafiles, tmpdir, filename1, filename2, overlay1 = _yaml.load(file1, shortname=filename1) overlay2 = _yaml.load(file2, shortname=filename2) - _yaml.composite_dict(base, overlay1) - _yaml.composite_dict(base, overlay2) + _yaml.composite(base, overlay1) + _yaml.composite(base, overlay2) children = base.get_sequence('children') assert len(children) == length @@ -401,8 +401,8 @@ def test_list_composition_twice(datafiles, tmpdir, filename1, filename2, overlay1 = _yaml.load(file1, shortname=filename1) overlay2 = _yaml.load(file2, shortname=filename2) - _yaml.composite_dict(overlay1, overlay2) - _yaml.composite_dict(base, overlay1) + _yaml.composite(overlay1, overlay2) + _yaml.composite(base, overlay1) children = base.get_sequence('children') assert len(children) == length |
