shithub: aubio

Download patch

ref: 269365558f536ae723ef22420137acd718a5c601
parent: e987c05c4c79459f0744b0c059575a3d57632c74
author: Paul Brossier <piem@piem.org>
date: Tue Apr 9 20:28:51 EDT 2013

python/tests/utils.py: add array_from_yaml_file

--- a/python/tests/utils.py
+++ b/python/tests/utils.py
@@ -11,3 +11,10 @@
     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