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/artifactcache | |
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/artifactcache')
-rw-r--r-- | tests/artifactcache/config.py | 4 | ||||
-rw-r--r-- | tests/artifactcache/junctions.py | 2 | ||||
-rw-r--r-- | tests/artifactcache/pull.py | 4 | ||||
-rw-r--r-- | tests/artifactcache/push.py | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py index 591cc0e03..928a6c524 100644 --- a/tests/artifactcache/config.py +++ b/tests/artifactcache/config.py @@ -101,11 +101,11 @@ def test_artifact_cache_precedence(tmpdir, override_caches, project_caches, user project_config['name'] = 'test' user_config_file = str(tmpdir.join('buildstream.conf')) - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + _yaml.dump(user_config, filename=user_config_file) project_dir = tmpdir.mkdir('project') project_config_file = str(project_dir.join('project.conf')) - _yaml.dump(_yaml.node_sanitize(project_config), filename=project_config_file) + _yaml.dump(project_config, filename=project_config_file) context = Context() context.load(config=user_config_file) diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py index 52d721baf..ab041ce27 100644 --- a/tests/artifactcache/junctions.py +++ b/tests/artifactcache/junctions.py @@ -35,7 +35,7 @@ def project_set_artifacts(project, url): 'url': url, 'push': True }) - _yaml.dump(_yaml.node_sanitize(project_config), filename=project_conf_file) + _yaml.dump(project_config, filename=project_conf_file) @pytest.mark.datafiles(DATA_DIR) diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py index d5f2c1f06..0b57a6c9a 100644 --- a/tests/artifactcache/pull.py +++ b/tests/artifactcache/pull.py @@ -73,7 +73,7 @@ def test_pull(cli, tmpdir, datafiles): } # Write down the user configuration file - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + _yaml.dump(user_config, filename=user_config_file) # Ensure CLI calls will use it cli.configure(user_config) @@ -182,7 +182,7 @@ def test_pull_tree(cli, tmpdir, datafiles): } # Write down the user configuration file - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + _yaml.dump(user_config, filename=user_config_file) # Ensure CLI calls will use it cli.configure(user_config) diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py index 1cf46a496..862393f35 100644 --- a/tests/artifactcache/push.py +++ b/tests/artifactcache/push.py @@ -66,7 +66,7 @@ def test_push(cli, tmpdir, datafiles): } # Write down the user configuration file - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + _yaml.dump(user_config, filename=user_config_file) # Fake minimal context context = Context() @@ -164,7 +164,7 @@ def test_push_message(tmpdir, datafiles): } # Write down the user configuration file - _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) + _yaml.dump(user_config, filename=user_config_file) queue = multiprocessing.Queue() # Use subprocess to avoid creation of gRPC threads in main BuildStream process |