diff options
author | Jürg Billeter <j@bitron.ch> | 2016-12-15 11:11:00 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2016-12-15 11:19:56 +0100 |
commit | 42e8c38f18e0ddecf1a3cf4e96836ed749042799 (patch) | |
tree | f1063dfbdb130b7f831c933523bbdc791eee2625 /tests/context | |
parent | 6a480fc7ff37ff7b37947e448345745713994305 (diff) | |
download | buildstream-42e8c38f18e0ddecf1a3cf4e96836ed749042799.tar.gz |
context.py: expand ~ in paths
Diffstat (limited to 'tests/context')
-rw-r--r-- | tests/context/context.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/context/context.py b/tests/context/context.py index 76942f98f..121f76fea 100644 --- a/tests/context/context.py +++ b/tests/context/context.py @@ -35,11 +35,11 @@ def test_context_load(context_fixture): assert(isinstance(context, Context)) context.load() - assert(context.sourcedir == '~/buildstream/sources') - assert(context.builddir == '~/buildstream/build') - assert(context.deploydir == '~/buildstream/deploy') - assert(context.artifactdir == '~/buildstream/artifacts') - assert(context.ccachedir == '~/buildstream/ccache') + assert(context.sourcedir == os.path.expanduser('~/buildstream/sources')) + assert(context.builddir == os.path.expanduser('~/buildstream/build')) + assert(context.deploydir == os.path.expanduser('~/buildstream/deploy')) + assert(context.artifactdir == os.path.expanduser('~/buildstream/artifacts')) + assert(context.ccachedir == os.path.expanduser('~/buildstream/ccache')) # Test that values in a user specified config file @@ -54,11 +54,11 @@ def test_context_load_user_config(context_fixture, datafiles): 'userconf.yaml') context.load(conf_file) - assert(context.sourcedir == '~/pony') - assert(context.builddir == '~/buildstream/build') - assert(context.deploydir == '~/buildstream/deploy') - assert(context.artifactdir == '~/buildstream/artifacts') - assert(context.ccachedir == '~/buildstream/ccache') + assert(context.sourcedir == os.path.expanduser('~/pony')) + assert(context.builddir == os.path.expanduser('~/buildstream/build')) + assert(context.deploydir == os.path.expanduser('~/buildstream/deploy')) + assert(context.artifactdir == os.path.expanduser('~/buildstream/artifacts')) + assert(context.ccachedir == os.path.expanduser('~/buildstream/ccache')) ####################################### |