JuliaDocs/Documenter.jl

Doctests not catching exceptions from show

Open

#1,631 创建于 2021年7月6日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Julia (513 fork)batch import
Topic: UsabilityType: Bughelp wanted

仓库指标

Star
 (910 star)
PR 合并指标
 (平均合并 16天 9小时) (30 天内合并 3 个 PR)

描述

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

贡献者指南