Changeset 973206a


Ignore:
Timestamp:
Mar 8, 2013, 8:38:17 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
2cedc83
Parents:
0a42239
Message:

python/tests/test_fvec.py: clarify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_fvec.py

    r0a42239 r973206a  
    66from numpy import array, shape
    77
     8default_size = 512
     9
    810class aubio_fvec_test_case(TestCase):
    911
    1012    def test_vector_created_with_zeroes(self):
    1113        a = fvec(10)
    12         a
    13         shape(a)
    14         a[0]
    15         #del a
    16         assert_equal(array(a), 0.)
     14        assert a.dtype == 'float32'
     15        assert a.shape == (10,)
     16        assert_equal (a, 0)
    1717
    1818    def test_vector_create_with_list(self):
    1919        a = fvec([0,1,2,3])
     20        assert a.dtype == 'float32'
     21        assert a.shape == (4,)
    2022        assert_equal (range(4), a)
    2123
    2224    def test_vector_assign_element(self):
    23         a = fvec()
     25        a = fvec(default_size)
    2426        a[0] = 1
    2527        assert_equal(a[0], 1)
    2628
    2729    def test_vector_assign_element_end(self):
    28         a = fvec()
     30        a = fvec(default_size)
    2931        a[-1] = 1
    3032        assert_equal(a[-1], 1)
Note: See TracChangeset for help on using the changeset viewer.