diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-06-21 09:21:02 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-06-25 10:43:38 +0000 |
commit | e4412977d8404a2a820c4c1c366604ab6cdc6427 (patch) | |
tree | 44f6f00edd358b42c8bd81ce4e835db9b93c2bd3 /tests/sources/git.py | |
parent | 6fb773257a715a2380d3c69b8047a672b23d9c82 (diff) | |
download | buildstream-e4412977d8404a2a820c4c1c366604ab6cdc6427.tar.gz |
_yaml: Remove useless calls to '_yaml.node_sanitize'
Calling '_yaml.dump' will itself call '_yaml.node_sanitize', therefore
we can remove all calls to it in places where we directly after call
dump.
Diffstat (limited to 'tests/sources/git.py')
-rw-r--r-- | tests/sources/git.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sources/git.py b/tests/sources/git.py index e01477c49..45a2b827a 100644 --- a/tests/sources/git.py +++ b/tests/sources/git.py @@ -786,7 +786,7 @@ def test_git_describe(cli, tmpdir, datafiles, ref_storage, tag_type): project_config = _yaml.load(os.path.join(project, 'project.conf')) _yaml.node_set(project_config, 'ref-storage', ref_storage) - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) repofiles = os.path.join(str(tmpdir), 'repofiles') os.makedirs(repofiles, exist_ok=True) @@ -900,7 +900,7 @@ def test_git_describe_head_is_tagged(cli, tmpdir, datafiles, ref_storage, tag_ty project_config = _yaml.load(os.path.join(project, 'project.conf')) _yaml.node_set(project_config, 'ref-storage', ref_storage) - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) repofiles = os.path.join(str(tmpdir), 'repofiles') os.makedirs(repofiles, exist_ok=True) @@ -1015,7 +1015,7 @@ def test_git_describe_relevant_history(cli, tmpdir, datafiles): project_config = _yaml.load(os.path.join(project, 'project.conf')) _yaml.node_set(project_config, 'ref-storage', 'project.refs') - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) repofiles = os.path.join(str(tmpdir), 'repofiles') os.makedirs(repofiles, exist_ok=True) @@ -1095,7 +1095,7 @@ def test_default_do_not_track_tags(cli, tmpdir, datafiles): project_config = _yaml.load(os.path.join(project, 'project.conf')) _yaml.node_set(project_config, 'ref-storage', 'inline') - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) repofiles = os.path.join(str(tmpdir), 'repofiles') os.makedirs(repofiles, exist_ok=True) @@ -1162,7 +1162,7 @@ def test_overwrite_rogue_tag_multiple_remotes(cli, tmpdir, datafiles): } } ]) - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) repo.add_annotated_tag('tag', 'tag') @@ -1208,7 +1208,7 @@ def test_overwrite_rogue_tag_multiple_remotes(cli, tmpdir, datafiles): repodir, reponame = os.path.split(repo.repo) - _yaml.dump(_yaml.node_sanitize(project_config), os.path.join(project, 'project.conf')) + _yaml.dump(project_config, os.path.join(project, 'project.conf')) config = repo.source_config(ref=new_ref) del config['track'] |