summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-04-21 17:48:15 +0200
committerAnthon van der Neut <anthon@mnt.org>2019-04-21 17:48:15 +0200
commitde8f65450fa85ab4e59afa91df669e05753d5b93 (patch)
treeba492894b7fb6f4a229f24ce7c0136c8af2d0e98 /_test
parent6c7a0920317ab4cf34950a6bb4f8e4bc2b494632 (diff)
downloadruamel.yaml-de8f65450fa85ab4e59afa91df669e05753d5b93.tar.gz
Add y/Y/n/N to boolean values under 1.10.15.93
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))*
Diffstat (limited to '_test')
-rw-r--r--_test/test_issues.py18
1 files changed, 18 insertions, 0 deletions
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 <block end>'):
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 = """