From 2d664a9a47c55f5adb8f7d9694fc4198067411ea Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sun, 1 Oct 2017 19:06:21 +0900 Subject: _yaml.py: Fixing inconsistently named API _yaml.validate_node() All of the _yaml APIs which deal with a node (dictionary loaded from YAML) are named _yaml.node_foo(), _yaml.node_bar(), _yaml.node_baz() etc, except for this one glaring exception. Also added a missing internal API documenting comment for _yaml.node_validate() Also updated all callers to _yaml.validate_node() to now call _yaml.node_validate(). --- tests/yaml/yaml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/yaml/yaml.py') diff --git a/tests/yaml/yaml.py b/tests/yaml/yaml.py index e972f89f4..948151bed 100644 --- a/tests/yaml/yaml.py +++ b/tests/yaml/yaml.py @@ -163,7 +163,7 @@ def test_composited_array_append_provenance(datafiles): @pytest.mark.datafiles(os.path.join(DATA_DIR)) -def test_validate_node(datafiles): +def test_node_validate(datafiles): valid = os.path.join(datafiles.dirname, datafiles.basename, @@ -174,12 +174,12 @@ def test_validate_node(datafiles): base = _yaml.load(valid) - _yaml.validate_node(base, ['kind', 'description', 'moods', 'children', 'extra']) + _yaml.node_validate(base, ['kind', 'description', 'moods', 'children', 'extra']) base = _yaml.load(invalid) with pytest.raises(LoadError) as exc: - _yaml.validate_node(base, ['kind', 'description', 'moods', 'children', 'extra']) + _yaml.node_validate(base, ['kind', 'description', 'moods', 'children', 'extra']) assert (exc.value.reason == LoadErrorReason.INVALID_DATA) -- cgit v1.2.1