-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
test: merged and refactored games.R tests #1682
base: main
Are you sure you want to change the base?
Conversation
Current Aviator status
This pull request is currently open (not queued). How to mergeTo merge this PR, comment
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
When you add these tests, I suggest you look at the functionality with a critical eye. If it seems problematic, or there are obvious possibilities for improvements, this is a good time to signal that. I am referring to things that affect the C library, and are not specific to R only. There is a theoretical possibility to make breaking changes before the 1.0 release. We have some old functions that are not up to the same quality standards that we try to uphold these days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!! Some comments on error messages, thanks for taking this on!
|
||
test_that("sample_chung_lu works", { | ||
chung_lu_small <- sample_chung_lu(c(3, 3, 2, 2, 1, 1)) | ||
expect_false(any_multiple(chung_lu_small)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we test for multiple and simple in other places? should we create a custom expectation? (a simple wrapper around expect_false(
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maelle I found 2 or 3 uses of it but many other expect_<true|false>(is_xxx())
we could think of adding helpers in a future PR!
Yes that is also something I try to do in parallel. I ping if I find something |
Co-authored-by: Maëlle Salmon <[email protected]>
Co-authored-by: Maëlle Salmon <[email protected]>
Co-authored-by: Maëlle Salmon <[email protected]>
also cleaned up code in games.R (eg
stop
->cli::cli_abort
)