testwhat icon indicating copy to clipboard operation
testwhat copied to clipboard

Write Submission Correctness Tests for R exercises

Results 44 testwhat issues
Sort by recently updated
recently updated
newest added

In this [exercise](https://campus.datacamp.com/courses/data-visualization-with-ggplot2-part-3/plots-for-specific-data-types-part-2?ex=5), Using the solution is obviously accepted, but the following fails: ```R germany There is something wrong in the following function call rgdal::readOGR(dsn = “shapes”, layer = “DEU_adm1”):...

bug

```r pec % check_function('cor') ``` Fails, but shouldn't, because it's valid magrittr code! Pretty big bug, can affect a lot of courses.

bug

The old markdown testing functions are used in only two courses: - Reporting with RMarkdown ([GitHub](https://github.com/datacamp/courses-rmarkdown), [Teach](https://www.datacamp.com/teach/repositories/428), [Campus](https://www.datacamp.com/courses/reporting-with-r-markdown)) - Communicating with Data in the TidyVerse ([GitHub](datacamp/courses-communicating-tidyverse), Teach, Campus) In short:...

tech-debt

I'm just starting to go through the ggplot2 courses updating SCTs to not use `test_ggplot()`. For a simple plot like this: ```r p % check_result() %>% check_equal() ``` `last_plot()` effectively...

enhancement

Currently, `testwhat` does not allow you to check the content of objects defined inside a function definition. In other words, in the example below, it is not possible to use...

enhancement

*** =solution ```{r} f % check_body() %>% check_function('sum', index=1) ``` **message** "There is something wrong in the following function call sum(a + b, …): … Used in a situation where...

bug

@filipsch A lot of times I see custom messages that simply use a different template from the default and hence are NOT completely custom. Here is an example: ```r ex()...

enhancement

@filipsch As discussed, here is a rough example of how we can make SCTs more human readable. It is inspired by BDD/TDD frameworks where I believe it is common to...

enhancement

In the case below... ``` check_object('x') %>% check_equal(eval = FALSE) ``` the first SCT checks the object exists, and the second checks it's value. Because of this, the argument `eval`...

docs

Currently, `check_equal()` calls `is_equal()`, which uses `all.equal()` to provide the equality checks when `eq_condition = "equal"` or `eq_condition = "equivalent"`. It is occasionally useful to be able to control the...

enhancement