def test_parent_invalid_parameter(self): with pytest.raises(YAMLPathException) as ex: nodes = list(KeywordSearches.parent( {}, False, ["abc"], YAMLPath("/") )) assert -1 < str(ex.value).find("Invalid parameter passed to ")
def test_parent_invalid_step_count(self): with pytest.raises(YAMLPathException) as ex: nodes = list(KeywordSearches.parent( {}, False, ["5"], YAMLPath("/") )) assert -1 < str(ex.value).find("higher than the document root")
def test_parent_invalid_inversion(self): with pytest.raises(YAMLPathException) as ex: nodes = list(KeywordSearches.parent( {}, True, [], YAMLPath("/") )) assert -1 < str(ex.value).find("Inversion is meaningless to ")