diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2018-03-12 15:19:38 +0000 |
---|---|---|
committer | Tristan Maat <tm@tlater.net> | 2018-03-16 14:55:30 +0000 |
commit | 90491b1479febe563f00dfb7855f599e18efed43 (patch) | |
tree | 57e35ba319e050fe9a5f81d42c462c914f5fd59c | |
parent | 5bccf6702717e4b605c096c464ab31a78a0e5fb0 (diff) | |
download | buildstream-90491b1479febe563f00dfb7855f599e18efed43.tar.gz |
tests: Amend tests to expect to load workspace format version 1
-rw-r--r-- | tests/frontend/workspace.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py index 974dc57fb..ecda49c51 100644 --- a/tests/frontend/workspace.py +++ b/tests/frontend/workspace.py @@ -226,7 +226,10 @@ def test_open_old_format(cli, tmpdir, datafiles): } workspace_dict_expected = { - "alpha.bst": "/workspaces/bravo" + "version": 1, + "alpha.bst": { + "path": "/workspaces/bravo", + }, } _yaml.dump(workspace_dict_old, workspace_config_path) @@ -241,8 +244,11 @@ def test_open_old_format(cli, tmpdir, datafiles): # running a workspace command elements = list(_yaml.node_items(loaded_config)) assert len(elements) == len(workspace_dict_expected) - for element, path in workspace_dict_expected.items(): - assert path == _yaml.node_get(loaded_config, str, element) + for element, config in workspace_dict_expected.items(): + if element == "version": + continue + assert config["path"] == _yaml.node_get(loaded_config[element], str, "path") + assert workspace_dict_expected["version"] == _yaml.node_get(loaded_config, int, "version") @pytest.mark.datafiles(DATA_DIR) |