From de8f65450fa85ab4e59afa91df669e05753d5b93 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Sun, 21 Apr 2019 17:48:15 +0200 Subject: Add y/Y/n/N to boolean values under 1.1 fixes issues #285 *When this change indeed resolves your problem, please **Close** this issue*. *(You can do so using the WorkFlow pull-down (close to the top right of this page))* --- _test/test_issues.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to '_test') diff --git a/_test/test_issues.py b/_test/test_issues.py index dd6910b..6392ebd 100644 --- a/_test/test_issues.py +++ b/_test/test_issues.py @@ -630,6 +630,24 @@ class TestIssues: with pytest.raises(ruamel.yaml.parser.ParserError, match='expected '): d = yaml.load(inp) + def test_issue_285(self): + from ruamel.yaml import YAML + + yaml = YAML() + inp = dedent("""\ + %YAML 1.1 + --- + - y + - n + - Y + - N + """) + a = yaml.load(inp) + assert a[0] + assert a[2] + assert not a[1] + assert not a[3] + # @pytest.mark.xfail(strict=True, reason='bla bla', raises=AssertionError) # def test_issue_ xxx(self): # inp = """ -- cgit v1.2.1