Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/f2py/tests/test_mixed.py @ 87:2a2c65a20a8b
Add Python libs and headers
author | Chris Cannam |
---|---|
date | Wed, 25 Feb 2015 14:05:22 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
86:413a9d26189e | 87:2a2c65a20a8b |
---|---|
1 from __future__ import division, absolute_import, print_function | |
2 | |
3 import os | |
4 import math | |
5 | |
6 from numpy.testing import * | |
7 from numpy import array | |
8 | |
9 import util | |
10 import textwrap | |
11 | |
12 def _path(*a): | |
13 return os.path.join(*((os.path.dirname(__file__),) + a)) | |
14 | |
15 class TestMixed(util.F2PyTest): | |
16 sources = [_path('src', 'mixed', 'foo.f'), | |
17 _path('src', 'mixed', 'foo_fixed.f90'), | |
18 _path('src', 'mixed', 'foo_free.f90')] | |
19 | |
20 @dec.slow | |
21 def test_all(self): | |
22 assert_( self.module.bar11() == 11) | |
23 assert_( self.module.foo_fixed.bar12() == 12) | |
24 assert_( self.module.foo_free.bar13() == 13) | |
25 | |
26 @dec.slow | |
27 def test_docstring(self): | |
28 expected = """ | |
29 a = bar11() | |
30 | |
31 Wrapper for ``bar11``. | |
32 | |
33 Returns | |
34 ------- | |
35 a : int | |
36 """ | |
37 assert_equal(self.module.bar11.__doc__, textwrap.dedent(expected).lstrip()) | |
38 | |
39 if __name__ == "__main__": | |
40 import nose | |
41 nose.runmodule() |