JuliaDocs/Documenter.jl

Doctests not catching exceptions from show

Open

#1,631 opened on 2021年7月6日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Julia (513 forks)batch import
Topic: UsabilityType: Bughelp wanted

Repository metrics

Stars
 (910 stars)
PR merge metrics
 (平均マージ 16d 9h) (30d で 3 merged PRs)

説明

This type of doctest, where show throws an error, does not work currently:

julia> gd
Error showing value of type GroupedDataFrame{DataFrame}:
ERROR: AssertionError: The current number of rows in the parent data frame is 3 and it does not match the number of rows it contained when GroupedDataFrame was created which was 2. The number of rows in the parent data frame has likely been changed unintentionally (e.g. using subset!, filter!, delete!, push!, or append! functions).

I believe it's because Documenter does not handle exceptions from the show calls which happen here: https://github.com/JuliaDocs/Documenter.jl/blob/6c8679bac445ab1c656744075b13a57835081cc3/src/DocTests.jl#L319

X-ref https://github.com/JuliaData/DataFrames.jl/pull/2811

コントリビューターガイド