History

tests/python/src/utils/scale.py: replace with python/tests/test_scale.py

Paul Brossier committed 13 years ago

Commit 68d04921 parent 71ef9c22 files · +18 −93Browse files

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

Unified · Split

python/tests/test_scale.py+18−0
@@ -0,0 +1,18 @@
1#! /usr/bin/env python
2
3from numpy.testing import TestCase, run_module_suite
4from numpy.testing import assert_equal, assert_almost_equal
5from numpy import arange
6from aubio import fvec, scale
7
8class aubio_cvec_test_case(TestCase):
9
10 def test_scale_simple(self):
11 a = arange(10).astype('float32')
12 s = scale ( 0., 10., 3., 8.)
13 s(a)
14 assert_equal ( a, [ 3., 3.5, 4., 4.5, 5., 5.5, 6., 6.5, 7., 7.5])
15
16if __name__ == '__main__':
17 from unittest import main
18 main()

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