@@ -9,40 +9,3 @@ include("../docs/makeplots.jl")
9
9
makeplots (mktempdir (); Plotter = CairoMakie, extension = " .svg" )
10
10
end
11
11
12
- function testnotebook (input)
13
- # de-markdown eventual cells with Pkg.develop and write
14
- # to pluto-tmp.jl
15
- notebook = Pluto. load_notebook_nobackup (input)
16
- pkgcellfortest = findfirst (c -> occursin (" Pkg.develop" , c. code), notebook. cells)
17
- if pkgcellfortest != nothing
18
- # de-markdown pkg cell
19
- notebook. cells[pkgcellfortest]. code = replace (notebook. cells[pkgcellfortest]. code, " md" => " " )
20
- notebook. cells[pkgcellfortest]. code = replace (notebook. cells[pkgcellfortest]. code, " \"\"\" " => " " )
21
- notebook. cells[pkgcellfortest]. code = replace (notebook. cells[pkgcellfortest]. code, " ;" => " " )
22
- @info " Pkg cell: $(pkgcellfortest) \n $(notebook. cells[pkgcellfortest]. code) "
23
- Pluto. save_notebook (notebook, " pluto-tmp.jl" )
24
- input = " pluto-tmp.jl"
25
- eval (Meta. parse (notebook. cells[pkgcellfortest]. code))
26
- end
27
-
28
- # run notebook and check for cell errors
29
- session = Pluto. ServerSession ()
30
- notebook = Pluto. SessionActions. open (session, input; run_async = false )
31
- errored = false
32
- for c in notebook. cells
33
- if c. errored
34
- errored = true
35
- @error " Error in $(c. cell_id) : $(c. output. body[:msg ]) \n $(c. code) "
36
- end
37
- end
38
- ! errored
39
- end
40
-
41
- @testset " notebooks" begin
42
- # notebooks=["plutovista.jl"]
43
- # for notebook in notebooks
44
- # input=joinpath(@__DIR__,"..","examples",notebook)
45
- # @info "notebook: $(input)"
46
- # @test testnotebook(input)
47
- # end
48
- end
0 commit comments