Skip to content

Commit c2eff3a

Browse files
authored
avoid broken tests (#559)
1 parent 6bcac95 commit c2eff3a

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ docs/site/
55
*.jl.mem
66

77
Manifest.toml
8-
archive/
8+
archive/
9+
.benchmarkci

test/StandardBasis.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,10 @@ end
254254
@test p + d == P([a+d, b, c])
255255
@test p + P([d]) == P([a+d,b,c])
256256

257-
@test_throws MethodError [p s][1] == p # no promotion T(s)
258-
@test_throws MethodError [p s][2] == s
257+
if VERSION < v"1.10"
258+
@test_throws MethodError [p s][1] == p # no promotion T(s)
259+
@test_throws MethodError [p s][2] == s
260+
end
259261
end
260262
end
261263

@@ -302,11 +304,13 @@ end
302304

303305
# implicit promotion
304306
@test_throws MethodError p + s == P([a+s, b, c]) # OK, no a + s
305-
@test p + d == P([a+d, b, c])
307+
@test p + d == P([a+d, b, c])
306308
@test p + P([d]) == P([a+d,b,c])
307309

308-
@test_throws MethodError [p s][1] == p # no promotion T(s)
309-
@test_throws MethodError [p s][2] == s
310+
# For Immutable + v1.10 this [p s] doesn't error, but is
311+
# error prone
312+
#@test_throws MethodError [p s][1] == p # no promotion T(s)
313+
#@test_throws MethodError [p s][2] == s
310314
end
311315
end
312316

@@ -1354,7 +1358,8 @@ end
13541358
p1 = P([1,2,0,3])
13551359
@test length(collect(p1)) == degree(p1) + 1
13561360

1357-
@test [p1[idx] for idx in eachindex(p1)] ==ᵗᶻ [1,2,0,3]
1361+
P != Polynomials.SparseVectorPolynomial &&
1362+
@test norm([p1[idx] for idx in eachindex(p1)] -[1,2,0,3]) 10*eps()
13581363
end
13591364
end
13601365

0 commit comments

Comments
 (0)