From 07d431607ff54d9b8313e335a9250df20eb4b71a Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Wed, 18 May 2016 22:20:42 +0200 Subject: [PATCH] improve test --- autocmake/parse_yaml.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autocmake/parse_yaml.py b/autocmake/parse_yaml.py index c613364..989a48a 100644 --- a/autocmake/parse_yaml.py +++ b/autocmake/parse_yaml.py @@ -20,6 +20,12 @@ def parse_yaml(stream, override={}): def test_parse_yaml(): text = """foo: bar this: that -var: '%(foo)'""" +var: '%(foo)' +list: + - a: '%(foo)' + - b: '%(foo)' + - c: '%(foo)'""" - assert parse_yaml(text) == {'foo': 'bar', 'this': 'that', 'var': 'bar'} + print(parse_yaml(text)) + assert parse_yaml(text) == {'foo': 'bar', 'this': 'that', 'var': 'bar', + 'list': [{'a': 'bar'}, {'b': 'bar'}, {'c': 'bar'}]}