History

python/tests/test_sink.py: add more tests, clean up created files

Paul Brossier committed 12 years ago

Commit ab352621 parent 18d8bef2 files · +62 −18Browse files

Showing the changes to python/tests/utils.py (1 of 2 files). Show all

Unified · Split

python/tests/utils.py+7−3
@@ -19,12 +19,16 @@ def get_default_test_sound(TestCase, rel_dir = 'sounds'): · 18 unmodified lines
19 else:19 else:
20 return all_sounds[0]20 return all_sounds[0]
21 21
22def get_tmp_sink_name():22def get_tmp_sink_path():
23 from tempfile import mkstemp23 from tempfile import mkstemp
24 import os24 import os
25 fd, name = mkstemp()25 fd, path = mkstemp()
26 os.close(fd)26 os.close(fd)
27 return name27 return path
28
29def del_tmp_sink_path(path):
30 import os
31 os.unlink(path)
28 32
29def array_from_yaml_file(filename):33def array_from_yaml_file(filename):
30 import yaml34 import yaml

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