diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-07-08 14:18:39 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-15 14:14:03 +0000 |
commit | 099e3ebf3aad424be2f3488aef9d9d961b700483 (patch) | |
tree | b1634644122751537e092caf8c35f8a1cee6cf9b /tests/frontend | |
parent | 695eddc069c9803eca5d004e80ca7be7defdd20c (diff) | |
download | buildstream-099e3ebf3aad424be2f3488aef9d9d961b700483.tar.gz |
_yaml: Remove 'node_get_provenance' and add 'Node.get_provenance'
This replaces the helper method by adding a 'get_provenance' on the node
directly
- Adapt all call sites
- Delay getting provenance wherever possible without major refactor
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/buildcheckout.py | 2 | ||||
-rw-r--r-- | tests/frontend/fetch.py | 2 | ||||
-rw-r--r-- | tests/frontend/show.py | 2 | ||||
-rw-r--r-- | tests/frontend/track.py | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index 07ebe7e6a..d3eec0d21 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -462,7 +462,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): # Assert that we have the expected provenance encoded into the error element_node = _yaml.load(element_path, shortname='junction-dep.bst') ref_node = element_node.get_sequence('depends').mapping_at(0) - provenance = _yaml.node_get_provenance(ref_node) + provenance = ref_node.get_provenance() assert str(provenance) in result.stderr diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py index ba79dcfd1..7ea357ac2 100644 --- a/tests/frontend/fetch.py +++ b/tests/frontend/fetch.py @@ -172,5 +172,5 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): # Assert that we have the expected provenance encoded into the error element_node = _yaml.load(element_path, shortname='junction-dep.bst') ref_node = element_node.get_sequence('depends').mapping_at(0) - provenance = _yaml.node_get_provenance(ref_node) + provenance = ref_node.get_provenance() assert str(provenance) in result.stderr diff --git a/tests/frontend/show.py b/tests/frontend/show.py index a0421bd37..756fe1786 100644 --- a/tests/frontend/show.py +++ b/tests/frontend/show.py @@ -335,7 +335,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage, workspaced): # Assert that we have the expected provenance encoded into the error element_node = _yaml.load(element_path, shortname='junction-dep.bst') ref_node = element_node.get_sequence('depends').mapping_at(0) - provenance = _yaml.node_get_provenance(ref_node) + provenance = ref_node.get_provenance() assert str(provenance) in dep_result.stderr dep_result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.SUBPROJECT_INCONSISTENT) diff --git a/tests/frontend/track.py b/tests/frontend/track.py index b8ab0d4eb..a628043d8 100644 --- a/tests/frontend/track.py +++ b/tests/frontend/track.py @@ -277,7 +277,7 @@ def test_inconsistent_junction(cli, tmpdir, datafiles, ref_storage): # Assert that we have the expected provenance encoded into the error element_node = _yaml.load(element_path, shortname='junction-dep.bst') ref_node = element_node.get_sequence('depends').mapping_at(0) - provenance = _yaml.node_get_provenance(ref_node) + provenance = ref_node.get_provenance() assert str(provenance) in result.stderr @@ -316,7 +316,7 @@ def test_junction_element(cli, tmpdir, datafiles, ref_storage): # Assert that we have the expected provenance encoded into the error element_node = _yaml.load(element_path, shortname='junction-dep.bst') ref_node = element_node.get_sequence('depends').mapping_at(0) - provenance = _yaml.node_get_provenance(ref_node) + provenance = ref_node.get_provenance() assert str(provenance) in result.stderr # Now track the junction itself |