History

moved tests to subdirectory

Paul Brossier committed 13 years ago

Commit 26adcfb1 parent 985ec9e21 files · +0 −0Browse files

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

Unified · Split

python/tests/test_source.py+27−0
@@ -0,0 +1,27 @@
1#! /usr/bin/env python
2
3from numpy.testing import TestCase, assert_equal, assert_almost_equal
4from aubio import fvec, source
5from numpy import array
6
7path = "/Users/piem/archives/sounds/loops/drum_Chocolate_Milk_-_Ation_Speaks_Louder_Than_Words.wav"
8
9class aubio_filter_test_case(TestCase):
10
11 def test_members(self):
12 f = source(path)
13 print dir(f)
14
15 def test_read(self):
16 f = source(path)
17 total_frames = 0
18 while True:
19 vec, read = f()
20 total_frames += read
21 if read < f.hop_size: break
22 print "read", total_frames / float(f.samplerate), " seconds from", path
23
24if __name__ == '__main__':
25 from unittest import main
26 main()
27

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