diff options
Diffstat (limited to '_test/test_issues.py')
-rw-r--r-- | _test/test_issues.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py index 5007f60..dd6910b 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -612,6 +612,23 @@ class TestIssues: assert 'c' in yaml_data.keys() assert 'c' in yaml_data._ok + def test_issue_284(self): + import ruamel.yaml + inp = dedent("""\ + plain key: in-line value + : # Both empty + "quoted key": + - entry + """) + yaml = ruamel.yaml.YAML(typ='rt') + yaml.version = (1, 2) + d = yaml.load(inp) + assert d[None] is None + + yaml = ruamel.yaml.YAML(typ='rt') + yaml.version = (1, 1) + with pytest.raises(ruamel.yaml.parser.ParserError, match='expected <block end>'): + d = yaml.load(inp) # @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError) # def test_issue_ xxx(self): |