diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-07-26 22:54:09 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-07-26 22:54:09 +0200 |
commit | 1b63538a35c6aeac66095b85b61651a05cdf3b39 (patch) | |
tree | 9247c51ca73397111c7f181dccba25ad5800c962 /_test/test_api_change.py | |
parent | 826e9b6140febc9444cfed18862bac5310b982b6 (diff) | |
download | ruamel.yaml-1b63538a35c6aeac66095b85b61651a05cdf3b39.tar.gz |
test for StopIteration
Diffstat (limited to '_test/test_api_change.py')
-rw-r--r-- | _test/test_api_change.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/_test/test_api_change.py b/_test/test_api_change.py index b745ee9..7209ae2 100644 --- a/_test/test_api_change.py +++ b/_test/test_api_change.py @@ -113,6 +113,21 @@ class TestRead: yaml.load('a: 1') # did not work in 0.15.4 +class TestLoadAll: + def test_multi_document_load(self, tmpdir): + """this went wrong on 3.7 because of StopIteration, PR 37 and Issue 211""" + fn = Path(str(tmpdir)) / 'test.yaml' + fn.write_text(textwrap.dedent("""\ + --- + - a + --- + - b + ... + """)) + yaml = YAML() + assert list(yaml.load_all(fn)) == [['a'], ['b']] + + class TestDuplSet: def test_dupl_set_00(self): # round-trip-loader should except |