def test_load_yaml_string_error(self): try: load_yaml('only a string') except YAMLError as ex: assert "not a YAML dict" in str(ex) else: assert False, "expected YAMLError"
def test_load_yaml(self): doc = load_yaml("hello:\n - 1\n - 2") assert doc == {"hello": [1, 2]}
def test_load_yaml(self): doc = load_yaml("hello:\n - 1\n - 2") eq_(doc, {'hello': [1, 2]})