From f7b461220ec2f1af3966ace12c21334f1f3b6457 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Fri, 28 Jun 2019 17:01:23 +0100 Subject: tests: Change all calls to _yaml.dump to _yaml.rountrip_dump Now that both are equivalent, we can skip the sanitization part before the yaml call. --- tests/sandboxes/fallback.py | 2 +- tests/sandboxes/missing_dependencies.py | 4 ++-- tests/sandboxes/remote-exec-config.py | 6 +++--- tests/sandboxes/selection.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/sandboxes') diff --git a/tests/sandboxes/fallback.py b/tests/sandboxes/fallback.py index eebe7ddb2..d8170c61d 100644 --- a/tests/sandboxes/fallback.py +++ b/tests/sandboxes/fallback.py @@ -54,7 +54,7 @@ def test_fallback_platform_fails(cli, datafiles): ], }, } - _yaml.dump(element, element_path) + _yaml.roundtrip_dump(element, element_path) clean_platform_cache() diff --git a/tests/sandboxes/missing_dependencies.py b/tests/sandboxes/missing_dependencies.py index 79153f769..33a169ca2 100644 --- a/tests/sandboxes/missing_dependencies.py +++ b/tests/sandboxes/missing_dependencies.py @@ -39,7 +39,7 @@ def test_missing_brwap_has_nice_error_message(cli, datafiles): ], }, } - _yaml.dump(element, element_path) + _yaml.roundtrip_dump(element, element_path) # Build without access to host tools, this should fail with a nice error result = cli.run( @@ -82,7 +82,7 @@ def test_old_brwap_has_nice_error_message(cli, datafiles, tmp_path): ], }, } - _yaml.dump(element, element_path) + _yaml.roundtrip_dump(element, element_path) # Build without access to host tools, this should fail with a nice error result = cli.run( diff --git a/tests/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py index 90418d6fc..a6aeeb7ab 100644 --- a/tests/sandboxes/remote-exec-config.py +++ b/tests/sandboxes/remote-exec-config.py @@ -38,7 +38,7 @@ def test_old_and_new_configs(cli, datafiles): } } project_conf_file = os.path.join(project, 'project.conf') - _yaml.dump(project_conf, project_conf_file) + _yaml.roundtrip_dump(project_conf, project_conf_file) # Use `pull` here to ensure we try to initialize the remotes, triggering the error # @@ -72,7 +72,7 @@ def test_missing_certs(cli, datafiles, config_key, config_value): } } project_conf_file = os.path.join(project, 'project.conf') - _yaml.dump(project_conf, project_conf_file) + _yaml.roundtrip_dump(project_conf, project_conf_file) # Use `pull` here to ensure we try to initialize the remotes, triggering the error # @@ -93,7 +93,7 @@ def test_empty_config(cli, datafiles): } } project_conf_file = os.path.join(project, 'project.conf') - _yaml.dump(project_conf, project_conf_file) + _yaml.roundtrip_dump(project_conf, project_conf_file) # Use `pull` here to ensure we try to initialize the remotes, triggering the error # diff --git a/tests/sandboxes/selection.py b/tests/sandboxes/selection.py index c20ce3d3a..50406b4cb 100644 --- a/tests/sandboxes/selection.py +++ b/tests/sandboxes/selection.py @@ -54,7 +54,7 @@ def test_force_sandbox(cli, datafiles): ], }, } - _yaml.dump(element, element_path) + _yaml.roundtrip_dump(element, element_path) clean_platform_cache() @@ -87,7 +87,7 @@ def test_dummy_sandbox_fallback(cli, datafiles): ], }, } - _yaml.dump(element, element_path) + _yaml.roundtrip_dump(element, element_path) clean_platform_cache() -- cgit v1.2.1