Skip to content
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
7 changes: 6 additions & 1 deletion test/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,16 @@ end

# We have our own registry for these test! Take a look at https://github.com/JuliaPluto/PlutoPkgTestRegistry#readme for more info about the test packages and their dependencies.

pluto_test_registry_spec = Pkg.RegistrySpec(;
const pluto_test_registry_spec = Pkg.RegistrySpec(;
url="https://github.com/JuliaPluto/PlutoPkgTestRegistry",
uuid=Base.UUID("96d04d5f-8721-475f-89c4-5ee455d3eda0"),
name="PlutoPkgTestRegistry",
)

const pkg_fixtures = joinpath(@__DIR__, "packages", "fixtures")



snapshots_dir = joinpath(@__DIR__, "snapshots")

isdir(snapshots_dir) && rm(snapshots_dir; force=true, recursive=true)
Expand Down Expand Up @@ -199,3 +203,4 @@ function check_project()
end



14 changes: 7 additions & 7 deletions test/packages/Basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ import Malt
cleanup(🍭, notebook)
end

simple_import_path = joinpath(@__DIR__, "simple_import.jl")
simple_import_path = joinpath(pkg_fixtures, "simple_import.jl")
simple_import_notebook = read(simple_import_path, String)

@testset "Manifest loading" begin
Expand Down Expand Up @@ -251,7 +251,7 @@ import Malt
end

@testset "Package added by url" begin
url_notebook = read(joinpath(@__DIR__, "url_import.jl"), String)
url_notebook = read(joinpath(pkg_fixtures, "url_import.jl"), String)

🍭 = ServerSession()

Expand All @@ -275,7 +275,7 @@ import Malt
cleanup(🍭, notebook)
end

future_notebook = read(joinpath(@__DIR__, "future_nonexisting_version.jl"), String)
future_notebook = read(joinpath(pkg_fixtures, "future_nonexisting_version.jl"), String)
@testset "Recovery from unavailable versions" begin
🍭 = ServerSession()

Expand Down Expand Up @@ -354,13 +354,13 @@ import Malt
cleanup(🍭, notebook)
end

pkg_cell_notebook = read(joinpath(@__DIR__, "pkg_cell.jl"), String)
pkg_cell_notebook = read(joinpath(pkg_fixtures, "pkg_cell.jl"), String)
@testset "Pkg cell -- loaded from file" begin
🍭 = ServerSession()

dir = mktempdir()
for n in ["Project.toml", "Manifest.toml"]
cp(joinpath(@__DIR__, "pkg_cell_env", n), joinpath(dir, n))
cp(joinpath(pkg_fixtures, "pkg_cell_env", n), joinpath(dir, n))
end
path = joinpath(dir, "hello.jl")
write(path, pkg_cell_notebook)
Expand Down Expand Up @@ -434,7 +434,7 @@ import Malt
@testset "File format -- Backwards compat" begin
🍭 = ServerSession()

pre_pkg_notebook = read(joinpath(@__DIR__, "old_import.jl"), String)
pre_pkg_notebook = read(joinpath(pkg_fixtures, "old_import.jl"), String)
dir = mktempdir()
path = joinpath(dir, "hello.jl")
write(path, pre_pkg_notebook)
Expand Down Expand Up @@ -495,7 +495,7 @@ import Malt
@testset "Bad files" begin
@testset "$(name)" for name in ["corrupted_manifest", "unregistered_import"]

original_path = joinpath(@__DIR__, "$(name).jl")
original_path = joinpath(pkg_fixtures, "$(name).jl")
original_contents = read(original_path, String)

🍭 = ServerSession()
Expand Down
2 changes: 1 addition & 1 deletion test/packages/PkgCompat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import Pkg
end

@testset "Compat manipulation" begin
old_path = joinpath(@__DIR__, "old_artifacts_import.jl")
old_path = joinpath(pkg_fixtures, "old_artifacts_import.jl")
old_contents = read(old_path, String)

dir = mktempdir()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading