コード例 #1
0
ファイル: test_musicutils.py プロジェクト: drogenlied/aubio
 def test_fail_not_fvec(self):
     try:
         level_detection("default", -70)
     except ValueError as e:
         pass
     else:
         self.fail('non-number input phase does not raise a TypeError')
コード例 #2
0
 def test_fail_not_fvec(self):
     try:
         level_detection("default", -70)
     except ValueError as e:
         pass
     else:
         self.fail('non-number input phase does not raise a TypeError')
コード例 #3
0
 def test_accept_fvec(self):
     level_detection(fvec(1024), -70.)
コード例 #4
0
 def test_minus_ones_is_zero(self):
     from numpy import ones
     assert level_detection(ones(1024, dtype="float32"), -70) == 0
コード例 #5
0
 def test_zeros_is_one(self):
     from math import isinf
     assert level_detection(fvec(1024), -70) == 1
コード例 #6
0
 def test_fail_not_fvec(self):
     try:
         level_detection("default", -70)
     except ValueError, e:
         pass
コード例 #7
0
ファイル: test_musicutils.py プロジェクト: aubio/aubio
 def test_zeros_is_one(self):
     assert level_detection(fvec(1024), -70) == 1
コード例 #8
0
ファイル: test_musicutils.py プロジェクト: aubio/aubio
 def test_fail_not_fvec(self):
     with self.assertRaises(ValueError):
         level_detection("default", -70)
コード例 #9
0
 def test_minus_ones_is_zero(self):
     from numpy import ones
     assert level_detection(ones(1024, dtype=float_type), -70) == 0
コード例 #10
0
 def test_zeros_is_one(self):
     assert level_detection(fvec(1024), -70) == 1
コード例 #11
0
 def test_fail_not_fvec(self):
     with self.assertRaises(ValueError):
         level_detection("default", -70)
コード例 #12
0
 def test_accept_fvec(self):
     level_detection(fvec(1024), -70.)
コード例 #13
0
ファイル: test_musicutils.py プロジェクト: nphilipp/aubio
 def test_zeros_is_one(self):
     from math import isinf
     assert level_detection(fvec(1024), -70) == 1
コード例 #14
0
ファイル: test_musicutils.py プロジェクト: nphilipp/aubio
 def test_fail_not_fvec(self):
     try:
         level_detection("default", -70)
     except ValueError, e:
         pass