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

WIP: fix namespace collisions #788

Closed
wants to merge 1 commit into from
Closed
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
24 changes: 24 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3329,6 +3329,30 @@ do_test("New files & Requires.jl") && @testset "New files & Requires.jl" begin
pop!(LOAD_PATH)
end

do_test("Name collision") && @testset "Name collision" begin
# Issue #747
testdir = newtestdir()
cproj = Base.active_project()
cd(testdir) do
Pkg.activate(pwd())
Pkg.add("BenchmarkTools")
Pkg.instantiate()
@eval(using BenchmarkTools) # This is necessary, but not sure why
write("localfile.jl", """
module Statistics
using BenchmarkTools
function f()
@btime rand()
end
end
""")
sleep(mtimedelay)
includet(joinpath(pwd(), "localfile.jl"))
@test @eval(Statistics.f()) isa Float64
end
Pkg.activate(cproj)
end

do_test("entr") && @testset "entr" begin
srcfile1 = joinpath(tempdir(), randtmp()*".jl"); push!(to_remove, srcfile1)
srcfile2 = joinpath(tempdir(), randtmp()*".jl"); push!(to_remove, srcfile2)
Expand Down
Loading