Skip to content

Commit

Permalink
Stop testing on Julia 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasnoack committed Jan 24, 2017
1 parent 9dae304 commit 911ead3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -3,7 +3,6 @@ os:
- linux
- osx
julia:
- 0.4
- 0.5
- nightly
notifications:
Expand Down
4 changes: 2 additions & 2 deletions test/dirichletmultinomial.jl
Expand Up @@ -46,9 +46,9 @@ d = DirichletMultinomial(10, 5)

for x in (2 * ones(5), [1, 2, 3, 4, 0], [3.0, 0.0, 3.0, 0.0, 4.0], [0, 0, 0, 0, 10])
@test pdf(d, x)
@compat factorial(d.n) * gamma(d.α0) / gamma(d.n + d.α0) * prod(gamma.(d.α + x) ./ factorial.(x) ./ gamma.(d.α))
factorial(d.n) * gamma(d.α0) / gamma(d.n + d.α0) * prod(gamma.(d.α + x) ./ factorial.(x) ./ gamma.(d.α))
@test logpdf(d, x)
@compat log(factorial(d.n)) + lgamma(d.α0) - lgamma(d.n + d.α0) + sum(lgamma.(d.α + x) - log.(factorial.(x)) - lgamma.(d.α))
log(factorial(d.n)) + lgamma(d.α0) - lgamma(d.n + d.α0) + sum(lgamma.(d.α + x) - log.(factorial.(x)) - lgamma.(d.α))
end

# test Sampling
Expand Down
12 changes: 3 additions & 9 deletions test/runtests.jl
Expand Up @@ -53,12 +53,6 @@ res = pmap(tests) do t
nothing
end

# in v0.4, pmap returns the exception, but doesn't throw it, so we need
# to test and rethrow
if VERSION < v"0.5.0-"
map(x -> isa(x, Exception) ? throw(x) : nothing, res)
else
# print method ambiguities
println("Potentially stale exports: ")
display(Base.Test.detect_ambiguities(Distributions))
end
# print method ambiguities
println("Potentially stale exports: ")
display(Base.Test.detect_ambiguities(Distributions))

0 comments on commit 911ead3

Please sign in to comment.