Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming test functions? #1

Open
sethaxen opened this issue May 18, 2023 · 1 comment
Open

Renaming test functions? #1

sethaxen opened this issue May 18, 2023 · 1 comment

Comments

@sethaxen
Copy link
Collaborator

Currently we have fails(f) and errors(f). I wonder if it would make more sense to rename these to test_fails(f) and test_errors(f), similar to the @test_throws, @test_broken macros provided by Test.

Perhaps even better, it would simplify user code if we make these macros so users could call @test_fails f(...) and @test_errors f(...).

@nickrobinson251
Copy link
Contributor

nickrobinson251 commented May 19, 2023

Here's some discussion on why they weren't macros to begin with:
JuliaDiff/ChainRulesTestUtils.jl#60 (comment)

the macro looks like @test_throws and @test_broken
but it does not at all work like those do.

@test_throws catchs the exception.
@test_broken x is very similar to @test !x + some extra stuff

I would worry that people might think @test_failure x is the same as same as @test !x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants