Skip to content

Commit f5dc9ab

Browse files
author
Vahid Tavanashad
committed
remove unnecessary setup_method
1 parent 1ba24aa commit f5dc9ab

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

dpnp/tests/test_product.py

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222

2323

2424
class TestCross:
25-
def setup_method(self):
26-
numpy.random.seed(42)
27-
2825
@pytest.mark.parametrize("axis", [None, 0])
2926
@pytest.mark.parametrize("axisc", [-1, 0])
3027
@pytest.mark.parametrize("axisb", [-1, 0])
@@ -179,9 +176,6 @@ def test_linalg_error(self):
179176

180177

181178
class TestDot:
182-
def setup_method(self):
183-
numpy.random.seed(42)
184-
185179
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
186180
def test_ones(self, dtype):
187181
n = 10**5
@@ -430,9 +424,6 @@ def test_out_error(self, shape1, shape2, out_shape):
430424

431425

432426
class TestInner:
433-
def setup_method(self):
434-
numpy.random.seed(42)
435-
436427
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
437428
def test_scalar(self, dtype):
438429
a = 2
@@ -596,9 +587,6 @@ def test_order(self, order):
596587

597588

598589
class TestMatmul:
599-
def setup_method(self):
600-
numpy.random.seed(42)
601-
602590
@pytest.mark.parametrize("dtype", _selected_dtypes)
603591
@pytest.mark.parametrize(
604592
"order1, order2", [("C", "C"), ("C", "F"), ("F", "C"), ("F", "F")]
@@ -1185,7 +1173,7 @@ def test_special_case(self, dt_out, shape1, shape2):
11851173

11861174
@pytest.mark.parametrize("dt", get_all_dtypes())
11871175
def test_syrk(self, dt):
1188-
a = generate_random_numpy_array((6, 9), dtype=dt)
1176+
a = generate_random_numpy_array((6, 9), dtype=dt, low=-5, high=5)
11891177
ia = dpnp.array(a)
11901178

11911179
result = dpnp.matmul(ia, ia.mT)
@@ -1507,9 +1495,6 @@ def test_invalid_axes(self, xp):
15071495

15081496
@testing.with_requires("numpy>=2.2")
15091497
class TestMatvec:
1510-
def setup_method(self):
1511-
numpy.random.seed(42)
1512-
15131498
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
15141499
@pytest.mark.parametrize(
15151500
"shape1, shape2",
@@ -1569,9 +1554,6 @@ def test_error(self, xp):
15691554

15701555

15711556
class TestMultiDot:
1572-
def setup_method(self):
1573-
numpy.random.seed(70)
1574-
15751557
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
15761558
@pytest.mark.parametrize(
15771559
"shapes",
@@ -1726,9 +1708,6 @@ def test_error(self):
17261708

17271709

17281710
class TestTensordot:
1729-
def setup_method(self):
1730-
numpy.random.seed(87)
1731-
17321711
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
17331712
def test_scalar(self, dtype):
17341713
a = 2
@@ -1860,9 +1839,6 @@ def test_error(self):
18601839

18611840

18621841
class TestVdot:
1863-
def setup_method(self):
1864-
numpy.random.seed(42)
1865-
18661842
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
18671843
def test_scalar(self, dtype):
18681844
a = numpy.array([3.5], dtype=dtype)
@@ -1953,9 +1929,6 @@ def test_error(self):
19531929

19541930
@testing.with_requires("numpy>=2.0")
19551931
class TestVecdot:
1956-
def setup_method(self):
1957-
numpy.random.seed(42)
1958-
19591932
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
19601933
@pytest.mark.parametrize(
19611934
"shape1, shape2",
@@ -2233,9 +2206,6 @@ def test_error(self, xp):
22332206

22342207
@testing.with_requires("numpy>=2.2")
22352208
class TestVecmat:
2236-
def setup_method(self):
2237-
numpy.random.seed(42)
2238-
22392209
@pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True))
22402210
@pytest.mark.parametrize(
22412211
"shape1, shape2",

0 commit comments

Comments
 (0)