OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
lib
/
python3.6
/
dist-packages
/
numpy
/
f2py
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 05:59:26 AM
rwxr-xr-x
📄
__init__.py
0 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📁
__pycache__
-
10/28/2024 05:59:26 AM
rwxr-xr-x
📁
src
-
10/28/2024 05:59:26 AM
rwxr-xr-x
📄
test_array_from_pyobj.py
21.46 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_assumed_shape.py
1.55 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_block_docstring.py
621 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_callback.py
3.89 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_common.py
802 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_compile_function.py
4.21 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_crackfortran.py
2.73 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_kind.py
1012 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_mixed.py
911 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_parameter.py
3.82 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_quoted_character.py
927 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_regression.py
698 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_return_character.py
3.83 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_return_complex.py
4.51 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_return_integer.py
4.47 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_return_logical.py
4.73 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_return_real.py
5.28 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_semicolon_split.py
1.48 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_size.py
1.26 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_string.py
610 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📄
util.py
9.39 KB
10/28/2024 05:59:24 AM
rw-r--r--
Editing: test_size.py
Close
import os import pytest from numpy.testing import assert_equal from . import util def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) class TestSizeSumExample(util.F2PyTest): sources = [_path('src', 'size', 'foo.f90')] @pytest.mark.slow def test_all(self): r = self.module.foo([[]]) assert_equal(r, [0], repr(r)) r = self.module.foo([[1, 2]]) assert_equal(r, [3], repr(r)) r = self.module.foo([[1, 2], [3, 4]]) assert_equal(r, [3, 7], repr(r)) r = self.module.foo([[1, 2], [3, 4], [5, 6]]) assert_equal(r, [3, 7, 11], repr(r)) @pytest.mark.slow def test_transpose(self): r = self.module.trans([[]]) assert_equal(r.T, [[]], repr(r)) r = self.module.trans([[1, 2]]) assert_equal(r, [[1], [2]], repr(r)) r = self.module.trans([[1, 2, 3], [4, 5, 6]]) assert_equal(r, [[1, 4], [2, 5], [3, 6]], repr(r)) @pytest.mark.slow def test_flatten(self): r = self.module.flatten([[]]) assert_equal(r, [], repr(r)) r = self.module.flatten([[1, 2]]) assert_equal(r, [1, 2], repr(r)) r = self.module.flatten([[1, 2, 3], [4, 5, 6]]) assert_equal(r, [1, 2, 3, 4, 5, 6], repr(r))