Esempio n. 1
0
def test_require_scalar(unknown_node: yatiml.UnknownNode,
                        unknown_scalar_node: yatiml.UnknownNode) -> None:
    unknown_scalar_node.require_scalar()
    with pytest.raises(yatiml.RecognitionError):
        unknown_node.require_scalar()
Esempio n. 2
0
 def yatiml_recognize(cls, node: yatiml.UnknownNode) -> None:
     node.require_scalar(str)