Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Dec 17, 2022
1 parent cf1a664 commit 8ad4544
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 32 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ottr
Title: An R Autograding Extension for Otter-Grader
Version: 1.2.0
Version: 1.3.0
Authors@R: c(
person(given = "Christopher",
family = "Pyles",
Expand Down
5 changes: 1 addition & 4 deletions R/TestFileResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,10 @@ TestFileResult <- R6::R6Class(

ret <- list(
filename = self$filename,
points = self$points,
test_case_results = tcr_lists
)

if (!nullish(self$points)) {
ret$points <- self$points
}

return(ret)
}
)
Expand Down
9 changes: 0 additions & 9 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,3 @@ valid_syntax <- function(script) {
)
return(!error)
}

#' Check whether a value is nullish (i.e. NULL or NA)
#'
#' @param x The value to cehck
#'
#' @return Whether the value is nullish
nullish <- function(x) {
return(is.null(x) || is.na(x))
}
17 changes: 0 additions & 17 deletions man/nullish.Rd

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"test_file_results": [
{
"filename": "files/integration_test_cases/q1.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -31,6 +32,7 @@
},
{
"filename": "files/integration_test_cases/q2.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -60,6 +62,7 @@
},
{
"filename": "files/integration_test_cases/q3.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"test_file_results": [
{
"filename": "files/integration_test_cases/q1.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -31,6 +32,7 @@
},
{
"filename": "files/integration_test_cases/q2.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -60,6 +62,7 @@
},
{
"filename": "files/integration_test_cases/q3.R",
"points": null,
"test_case_results": [
{
"passed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"test_file_results": [
{
"filename": "files/integration_test_cases/q1.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -31,6 +32,7 @@
},
{
"filename": "files/integration_test_cases/q2.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down Expand Up @@ -60,6 +62,7 @@
},
{
"filename": "files/integration_test_cases/q3.R",
"points": null,
"test_case_results": [
{
"passed": true,
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test_TestFileResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ test_that("$to_list() returns the test file results as a list", {
tfr_list <- tfr$to_list()

expect_true(is.list(tfr_list))
expect_equal(length(tfr_list), 2)
expect_equal(length(tfr_list), 3)
expect_equal(tfr_list$filename, filename)
expect_equal(tfr_list$points, NULL)
expect_equal(tfr_list$test_case_results, lapply(tcrs, function(tcr) tcr$to_list()))

tfr <- TestFileResult$new(filename, tcrs, 2)
Expand Down

0 comments on commit 8ad4544

Please sign in to comment.