diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-01-12 17:43:32 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2018-01-12 17:50:53 +0000 |
commit | 571406d44dd1aafa8f1518a14fc23e3f111145cd (patch) | |
tree | 01966f7e612dc05bcaef2f138979b12fe4e42afa /tests/artifactcache/config.py | |
parent | 880ece190f54ad29dbcd359f84b87c95dcf0536f (diff) | |
download | buildstream-571406d44dd1aafa8f1518a14fc23e3f111145cd.tar.gz |
Make artifact cache tests work in python3.4jonathan/fix-tests-python34
A LocalPath was being passed into os.path.isabs, which failed when it
tried to call the path's startswith method.
Converting it to a string before using _yaml.dump seemed to solve the
problem.
Diffstat (limited to 'tests/artifactcache/config.py')
-rw-r--r-- | tests/artifactcache/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py index 3416f6c10..e734c2dbe 100644 --- a/tests/artifactcache/config.py +++ b/tests/artifactcache/config.py @@ -87,16 +87,16 @@ def test_artifact_cache_precedence(tmpdir, override_caches, project_caches, user user_config, project_config = configure_remote_caches(override_caches, project_caches, user_caches) project_config['name'] = 'test' - user_config_file = tmpdir.join('buildstream.conf') + user_config_file = str(tmpdir.join('buildstream.conf')) _yaml.dump(_yaml.node_sanitize(user_config), filename=user_config_file) project_dir = tmpdir.mkdir('project') - project_config_file = project_dir.join('project.conf') + project_config_file = str(project_dir.join('project.conf')) _yaml.dump(_yaml.node_sanitize(project_config), filename=project_config_file) context = Context([]) context.load(config=user_config_file) - project = Project(project_dir, context) + project = Project(str(project_dir), context) # Use the helper from the artifactcache module to parse our configuration. parsed_cache_specs = configured_remote_artifact_cache_specs(context, project) |