summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_parameter.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/tests/test_parameter.py')
-rw-r--r--numpy/f2py/tests/test_parameter.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/numpy/f2py/tests/test_parameter.py b/numpy/f2py/tests/test_parameter.py
index 22e1b52d3..4ea102e84 100644
--- a/numpy/f2py/tests/test_parameter.py
+++ b/numpy/f2py/tests/test_parameter.py
@@ -6,13 +6,15 @@ from numpy.testing import assert_raises, assert_equal
from . import util
+
class TestParameters(util.F2PyTest):
# Check that intent(in out) translates as intent(inout)
- sources = [util.getpath('tests', 'src', 'parameter', 'constant_real.f90'),
- util.getpath('tests', 'src', 'parameter', 'constant_integer.f90'),
- util.getpath('tests', 'src', 'parameter', 'constant_both.f90'),
- util.getpath('tests', 'src', 'parameter', 'constant_compound.f90'),
- util.getpath('tests', 'src', 'parameter', 'constant_non_compound.f90'),
+ sources = [
+ util.getpath("tests", "src", "parameter", "constant_real.f90"),
+ util.getpath("tests", "src", "parameter", "constant_integer.f90"),
+ util.getpath("tests", "src", "parameter", "constant_both.f90"),
+ util.getpath("tests", "src", "parameter", "constant_compound.f90"),
+ util.getpath("tests", "src", "parameter", "constant_non_compound.f90"),
]
@pytest.mark.slow
@@ -24,7 +26,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.float32)
self.module.foo_single(x)
- assert_equal(x, [0 + 1 + 2*3, 1, 2])
+ assert_equal(x, [0 + 1 + 2 * 3, 1, 2])
@pytest.mark.slow
def test_constant_real_double(self):
@@ -35,7 +37,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.float64)
self.module.foo_double(x)
- assert_equal(x, [0 + 1 + 2*3, 1, 2])
+ assert_equal(x, [0 + 1 + 2 * 3, 1, 2])
@pytest.mark.slow
def test_constant_compound_int(self):
@@ -46,14 +48,14 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.int32)
self.module.foo_compound_int(x)
- assert_equal(x, [0 + 1 + 2*6, 1, 2])
+ assert_equal(x, [0 + 1 + 2 * 6, 1, 2])
@pytest.mark.slow
def test_constant_non_compound_int(self):
# check values
x = np.arange(4, dtype=np.int32)
self.module.foo_non_compound_int(x)
- assert_equal(x, [0 + 1 + 2 + 3*4, 1, 2, 3])
+ assert_equal(x, [0 + 1 + 2 + 3 * 4, 1, 2, 3])
@pytest.mark.slow
def test_constant_integer_int(self):
@@ -64,7 +66,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.int32)
self.module.foo_int(x)
- assert_equal(x, [0 + 1 + 2*3, 1, 2])
+ assert_equal(x, [0 + 1 + 2 * 3, 1, 2])
@pytest.mark.slow
def test_constant_integer_long(self):
@@ -75,7 +77,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.int64)
self.module.foo_long(x)
- assert_equal(x, [0 + 1 + 2*3, 1, 2])
+ assert_equal(x, [0 + 1 + 2 * 3, 1, 2])
@pytest.mark.slow
def test_constant_both(self):
@@ -86,7 +88,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.float64)
self.module.foo(x)
- assert_equal(x, [0 + 1*3*3 + 2*3*3, 1*3, 2*3])
+ assert_equal(x, [0 + 1 * 3 * 3 + 2 * 3 * 3, 1 * 3, 2 * 3])
@pytest.mark.slow
def test_constant_no(self):
@@ -97,7 +99,7 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.float64)
self.module.foo_no(x)
- assert_equal(x, [0 + 1*3*3 + 2*3*3, 1*3, 2*3])
+ assert_equal(x, [0 + 1 * 3 * 3 + 2 * 3 * 3, 1 * 3, 2 * 3])
@pytest.mark.slow
def test_constant_sum(self):
@@ -108,4 +110,4 @@ class TestParameters(util.F2PyTest):
# check values with contiguous array
x = np.arange(3, dtype=np.float64)
self.module.foo_sum(x)
- assert_equal(x, [0 + 1*3*3 + 2*3*3, 1*3, 2*3])
+ assert_equal(x, [0 + 1 * 3 * 3 + 2 * 3 * 3, 1 * 3, 2 * 3])