Skip to content

Commit 77325ba

Browse files
committed
TST: tweak autogenerated ufunc smoke tests make them less noisy
They will go at some point anyway.
1 parent 13ee073 commit 77325ba

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

torch_np/tests/test_binary_ufuncs.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ def test_arctan2():
2020

2121

2222
def test_bitwise_and():
23-
assert_allclose(np.bitwise_and(0.5, 0.6),
24-
bitwise_and(0.5, 0.6), atol=1e-7, check_dtype=False)
23+
assert_allclose(np.bitwise_and(5, 6),
24+
bitwise_and(5, 6), atol=1e-7, check_dtype=False)
2525

2626

2727

2828
def test_bitwise_or():
29-
assert_allclose(np.bitwise_or(0.5, 0.6),
30-
bitwise_or(0.5, 0.6), atol=1e-7, check_dtype=False)
29+
assert_allclose(np.bitwise_or(5, 6),
30+
bitwise_or(5, 6), atol=1e-7, check_dtype=False)
3131

3232

3333

3434
def test_bitwise_xor():
35-
assert_allclose(np.bitwise_xor(0.5, 0.6),
36-
bitwise_xor(0.5, 0.6), atol=1e-7, check_dtype=False)
35+
assert_allclose(np.bitwise_xor(5, 6),
36+
bitwise_xor(5, 6), atol=1e-7, check_dtype=False)
3737

3838

3939

@@ -86,8 +86,8 @@ def test_fmod():
8686

8787

8888
def test_gcd():
89-
assert_allclose(np.gcd(0.5, 0.6),
90-
gcd(0.5, 0.6), atol=1e-7, check_dtype=False)
89+
assert_allclose(np.gcd(5, 6),
90+
gcd(5, 6), atol=1e-7, check_dtype=False)
9191

9292

9393

@@ -116,20 +116,20 @@ def test_hypot():
116116

117117

118118
def test_lcm():
119-
assert_allclose(np.lcm(0.5, 0.6),
120-
lcm(0.5, 0.6), atol=1e-7, check_dtype=False)
119+
assert_allclose(np.lcm(5, 6),
120+
lcm(5, 6), atol=1e-7, check_dtype=False)
121121

122122

123123

124124
def test_ldexp():
125-
assert_allclose(np.ldexp(0.5, 0.6),
126-
ldexp(0.5, 0.6), atol=1e-7, check_dtype=False)
125+
assert_allclose(np.ldexp(0.5, 6),
126+
ldexp(0.5, 6), atol=1e-7, check_dtype=False)
127127

128128

129129

130130
def test_left_shift():
131-
assert_allclose(np.left_shift(0.5, 0.6),
132-
left_shift(0.5, 0.6), atol=1e-7, check_dtype=False)
131+
assert_allclose(np.left_shift(5, 6),
132+
left_shift(5, 6), atol=1e-7, check_dtype=False)
133133

134134

135135

@@ -176,8 +176,8 @@ def test_logical_xor():
176176

177177

178178
def test_matmul():
179-
assert_allclose(np.matmul(0.5, 0.6),
180-
matmul(0.5, 0.6), atol=1e-7, check_dtype=False)
179+
assert_allclose(np.matmul([0.5], [0.6]),
180+
matmul([0.5], [0.6]), atol=1e-7, check_dtype=False)
181181

182182

183183

@@ -230,8 +230,8 @@ def test_remainder():
230230

231231

232232
def test_right_shift():
233-
assert_allclose(np.right_shift(0.5, 0.6),
234-
right_shift(0.5, 0.6), atol=1e-7, check_dtype=False)
233+
assert_allclose(np.right_shift(5, 6),
234+
right_shift(5, 6), atol=1e-7, check_dtype=False)
235235

236236

237237

torch_np/tests/test_unary_ufuncs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def test_arccos():
2727

2828

2929
def test_arccosh():
30-
assert_allclose(np.arccosh(0.5),
31-
arccosh(0.5), atol=1e-14, check_dtype=False)
30+
assert_allclose(np.arccosh(1.5),
31+
arccosh(1.5), atol=1e-14, check_dtype=False)
3232

3333

3434

0 commit comments

Comments
 (0)