summaryrefslogtreecommitdiff
path: root/tests/internals
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2019-06-11 07:55:21 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:02 +0000
commit4a56ebe6e589e2aa5d8da3fc2b76f76a19aa03b7 (patch)
treeffbdb49a64bd27f0ce0d9e421170a60f6db6706d /tests/internals
parentd14b809cc7b56b7be9e3e40c2e12e8f7245ba680 (diff)
downloadbuildstream-4a56ebe6e589e2aa5d8da3fc2b76f76a19aa03b7.tar.gz
_yaml: Add 'as_int()' on ScalarNode
- Add the 'as_int()' method on 'ScalarNode' to replace 'node_get(mapping, key, int)' - Adapt all call sites to use the new API
Diffstat (limited to 'tests/internals')
-rw-r--r--tests/internals/yaml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/internals/yaml.py b/tests/internals/yaml.py
index 012449ee4..0e747fa48 100644
--- a/tests/internals/yaml.py
+++ b/tests/internals/yaml.py
@@ -451,7 +451,7 @@ def test_value_doesnt_match_expected(datafiles):
test_dict = _yaml.load(conf_file)
with pytest.raises(LoadError) as exc:
- _yaml.node_get(test_dict, int, "Test4")
+ test_dict.get_int("Test4")
assert exc.value.reason == LoadErrorReason.INVALID_DATA