History

python/tests/utils.py: add array_from_yaml_file

Paul Brossier committed 13 years ago

Commit 26936551 parent e987c051 file · +7 −0Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/tests/utils.py+7−0
@@ -11,3 +11,10 @@ def list_all_sounds(rel_dir): · 10 unmodified lines
1111 import os.path, glob
1212 datadir = os.path.join(os.path.dirname(__file__), rel_dir)
1313 return glob.glob(os.path.join(datadir,'*.*'))
14+
15+def array_from_yaml_file(filename):
16+ import yaml
17+ f = open(filename)
18+ yaml_data = yaml.safe_load(f)
19+ f.close()
20+ return yaml_data

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t