ITADN

Add warnings to test

#2312Closedjmnavarro 创建于 2026-01-13
J
jmnavarrocommented
Hi there! We're working on some tests that have 3 possible outcomes: fail (green), error (red), and warning (orange). Tests will fail only in case of errors but we want to report in the output both errors and warnings. I've noticed there's a function for that: ``` testthat::testthat_warn("this is a warning") ``` but it's not exported, so when I invoke it, I get error `Error: 'testthat_warn' is not an exported object from 'namespace:testthat'` Is there any workaround? I'm happy to make a contribution making `testthat_warn` public, but first I want to make sure which is the best approach Thanks!
关闭于 2026-01-14 1 条评论