python-ruamel-yaml/tests/basic/test.py
Akira TAGOH b4ed6663a5 Add CI test.
Resolves: rhbz#2009152
2021-09-30 14:29:59 +09:00

15 lines
268 B
Python

#! /usr/bin/python3
import sys
import os
from ruamel.yaml import YAML
f = open(os.path.abspath(os.path.join(os.path.dirname(__file__),'..', 'tests.yml')), 'r')
s = f.read()
f.close()
yaml = YAML()
data = yaml.load(s)
if data[0]['hosts'] != 'localhost':
exit(1)