PyYAML/tests/smoke/pyyaml_load.py
Štěpán Šigut 26b6c33011 Import CI tests from RHEL
This is from RHEL distgit tests/PyYAML, directory Sanity/Smoke.

The original commit hash: fd668cd6d20ca9c46d9bfa5ccf34f3a925317b25

Only necessary files were kept.

Co-Authored-By: Lukas Zachar <lzachar@redhat.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
2024-04-11 17:05:14 +02:00

14 lines
178 B
Python

#!/usr/bin/env python
import yaml
documents = """
---
name: foo
---
name: bar
---
name: foobar
"""
for data in yaml.load_all(documents, Loader=yaml.SafeLoader):
print(data)