Skip to content

Commit 2280773

Browse files
Use black 22.6.0 for test_absolute
1 parent a4795ff commit 2280773

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/test_absolute.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
import numpy
66

77

8-
@pytest.mark.parametrize("type",
9-
[numpy.int64],
10-
ids=['int64'])
8+
@pytest.mark.parametrize("type", [numpy.int64], ids=["int64"])
119
def test_abs_int(type):
1210
a = numpy.array([1, 0, 2, -3, -1, 2, 21, -9])
1311
ia = inp.array(a)
@@ -17,9 +15,7 @@ def test_abs_int(type):
1715
numpy.testing.assert_array_equal(expected, result)
1816

1917

20-
@pytest.mark.parametrize("type",
21-
[numpy.int64],
22-
ids=['int64'])
18+
@pytest.mark.parametrize("type", [numpy.int64], ids=["int64"])
2319
def test_absolute_int(type):
2420
a = numpy.array([1, 0, 2, -3, -1, 2, 21, -9])
2521
ia = inp.array(a)
@@ -29,24 +25,28 @@ def test_absolute_int(type):
2925
numpy.testing.assert_array_equal(expected, result)
3026

3127

32-
@pytest.mark.parametrize("type",
33-
[numpy.float64],
34-
ids=[pytest.floatMAX])
28+
@pytest.mark.parametrize("type", [numpy.float64], ids=[pytest.floatMAX])
3529
def test_absolute_float(type):
36-
a = numpy.array([[-2., 3., 9.1], [-2., 5.0, -2], [1.0, -2., 5.0]], dtype = pytest.floatMAX)
30+
a = numpy.array(
31+
[[-2.0, 3.0, 9.1], [-2.0, 5.0, -2], [1.0, -2.0, 5.0]], dtype=pytest.floatMAX
32+
)
3733
ia = inp.array(a)
3834

3935
result = inp.absolute(ia)
4036
expected = numpy.absolute(a)
4137
numpy.testing.assert_array_equal(expected, result)
4238

4339

44-
@pytest.mark.parametrize("type",
45-
[numpy.float64],
46-
ids=[pytest.floatMAX])
40+
@pytest.mark.parametrize("type", [numpy.float64], ids=[pytest.floatMAX])
4741
def test_absolute_float_3(type):
48-
a = numpy.array([[[-2., 3.], [9.1, 0.2]], [[-2., 5.0], [-2, -1.2]], [[1.0, -2.], [5.0, -1.1]]],
49-
dtype = pytest.floatMAX)
42+
a = numpy.array(
43+
[
44+
[[-2.0, 3.0], [9.1, 0.2]],
45+
[[-2.0, 5.0], [-2, -1.2]],
46+
[[1.0, -2.0], [5.0, -1.1]],
47+
],
48+
dtype=pytest.floatMAX,
49+
)
5050
ia = inp.array(a)
5151

5252
result = inp.absolute(ia)

0 commit comments

Comments
 (0)