From e4a22712635f97923be6c39f4946905a3c7f352b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Fri, 9 Jan 2026 13:57:31 +0100 Subject: [PATCH 1/2] Catch errors in pluto notebooks Before they didn't trigger runtests to fail --- Project.toml | 2 +- ext/ExampleJugglerPlutoExt.jl | 10 ++++++---- src/plutoext.jl | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index a52898e..2ee5916 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ExampleJuggler" uuid = "3bbe58f8-ed81-4c4e-a134-03e85fcf4a1a" authors = ["Jürgen Fuhrmann "] -version = "2.5" +version = "2.5.1" [deps] ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e" diff --git a/ext/ExampleJugglerPlutoExt.jl b/ext/ExampleJugglerPlutoExt.jl index 4059b0c..e658e7b 100644 --- a/ext/ExampleJugglerPlutoExt.jl +++ b/ext/ExampleJugglerPlutoExt.jl @@ -29,12 +29,14 @@ function testplutonotebook(notebookname::String; pluto_project = Base.active_pro errored = false for c in notebook.cells - if occursin("@test", c.code) - @test !c.errored - end if c.errored errored = true - @error "Error in $(c.cell_id): $(c.output.body[:msg])\n\n $(c.code)\n" + @error """Error in cell $(c.cell_id): $(c.output.body[:msg]) + + ---------------------------------------------------- + $(c.code) + ---------------------------------------------------- + """ end end ENV["PLUTO_PROJECT"] = nothing diff --git a/src/plutoext.jl b/src/plutoext.jl index 96a1ae8..548629b 100644 --- a/src/plutoext.jl +++ b/src/plutoext.jl @@ -99,7 +99,7 @@ Keyword arguments: """ function testplutonotebooks(example_dir, notebooks; kwargs...) for notebook in notebooks - testplutonotebook(joinpath(example_dir, notebook); kwargs...) + @test testplutonotebook(joinpath(example_dir, notebook); kwargs...) end return end From a6d49ab101883f1e235403d7d848c6d174ce25ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Fri, 9 Jan 2026 14:22:07 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86cd419..69c8f00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## [2.5.1] - 2026-01-09 +- Catch errors during @testplutonotebooks + ## [2.5.0] - 2026-01-08 - run script tests in the directory where script is located - runic format and other checks