summaryrefslogtreecommitdiff
path: root/tests/sources/git.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-21 09:21:02 +0100
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-21 09:21:02 +0100
commit58e170dd28ac0fd4637176e1442052827398f965 (patch)
tree36ac97aa384c3e3af93582ebd55b7572dc23ef60 /tests/sources/git.py
parent2d57e14bdd8ac83ddf054ee25c1b97ceb2a2bfaf (diff)
downloadbuildstream-bschubert/remove-useless-sanitize.tar.gz
_yaml: Remove useless calls to '_yaml.node_sanitize'bschubert/remove-useless-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.py12
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']