diff options
Diffstat (limited to '_test')
-rw-r--r-- | _test/test_issues.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_test/test_issues.py b/_test/test_issues.py index 62c1d92..171eb2b 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -380,3 +380,15 @@ class TestIssues: yaml = ruamel.yaml.YAML(typ='safe') yaml.load('phone: 0123456789') + + def test_issue_232(self): + import ruamel.yaml + from ruamel import yaml + with pytest.raises(ruamel.yaml.scanner.ScannerError, match='unmatched'): + yaml.safe_load(']') + with pytest.raises(ruamel.yaml.scanner.ScannerError, match='unmatched'): + yaml.load(']') + with pytest.raises(ruamel.yaml.scanner.ScannerError, match='expected'): + yaml.safe_load('{]') + with pytest.raises(ruamel.yaml.scanner.ScannerError, match='expected'): + yaml.load('{]') |