From 269365558f536ae723ef22420137acd718a5c601 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 10 Apr 2013 00:28:51 -0500 Subject: [PATCH] python/tests/utils.py: add array_from_yaml_file --- python/tests/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/tests/utils.py b/python/tests/utils.py index fa4dc44f..fda8cb79 100644 --- a/python/tests/utils.py +++ b/python/tests/utils.py @@ -11,3 +11,10 @@ def list_all_sounds(rel_dir): import os.path, glob datadir = os.path.join(os.path.dirname(__file__), rel_dir) return glob.glob(os.path.join(datadir,'*.*')) + +def array_from_yaml_file(filename): + import yaml + f = open(filename) + yaml_data = yaml.safe_load(f) + f.close() + return yaml_data -- 2.26.2