File: test_standard_array_spec.py

package info (click to toggle)
python-scipy 0.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 52,228 kB
  • ctags: 63,719
  • sloc: python: 112,726; fortran: 88,685; cpp: 86,979; ansic: 85,860; makefile: 530; sh: 236
file content (25 lines) | stat: -rw-r--r-- 663 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from __future__ import absolute_import, print_function

from numpy import arange
from numpy.testing import TestCase, assert_, run_module_suite

from scipy.weave import standard_array_spec


class TestArrayConverter(TestCase):

    def test_type_match_string(self):
        s = standard_array_spec.array_converter()
        assert_(not s.type_match('string'))

    def test_type_match_int(self):
        s = standard_array_spec.array_converter()
        assert_(not s.type_match(5))

    def test_type_match_array(self):
        s = standard_array_spec.array_converter()
        assert_(s.type_match(arange(4)))


if __name__ == "__main__":
    run_module_suite()