Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid broken tests #559

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
avoid broken tests
  • Loading branch information
jverzani committed Jan 23, 2024
commit 9e2f054b8c133d32ede976119a3f669593a7f41d
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ docs/site/
*.jl.mem

Manifest.toml
archive/
archive/
.benchmarkci
17 changes: 11 additions & 6 deletions test/StandardBasis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ end
@test p + d == P([a+d, b, c])
@test p + P([d]) == P([a+d,b,c])

@test_throws MethodError [p s][1] == p # no promotion T(s)
@test_throws MethodError [p s][2] == s
if VERSION < v"1.10"
@test_throws MethodError [p s][1] == p # no promotion T(s)
@test_throws MethodError [p s][2] == s
end
end
end

Expand Down Expand Up @@ -302,11 +304,13 @@ end

# implicit promotion
@test_throws MethodError p + s == P([a+s, b, c]) # OK, no a + s
@test p + d == P([a+d, b, c])
@test p + d == P([a+d, b, c])
@test p + P([d]) == P([a+d,b,c])

@test_throws MethodError [p s][1] == p # no promotion T(s)
@test_throws MethodError [p s][2] == s
# For Immutable + v1.10 this [p s] doesn't error, but is
# error prone
#@test_throws MethodError [p s][1] == p # no promotion T(s)
#@test_throws MethodError [p s][2] == s
end
end

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

@test [p1[idx] for idx in eachindex(p1)] ==ᵗᶻ [1,2,0,3]
P != Polynomials.SparseVectorPolynomial &&
@test norm([p1[idx] for idx in eachindex(p1)] -[1,2,0,3]) ≤ 10*eps()
end
end

Expand Down
Loading