Skip to content

Informative errors for for tinytest::test_all() with non-existent or empty inst/testdir#144

Open
JesseAlderliesten wants to merge 1 commit into
markvanderloo:masterfrom
JesseAlderliesten:master
Open

Informative errors for for tinytest::test_all() with non-existent or empty inst/testdir#144
JesseAlderliesten wants to merge 1 commit into
markvanderloo:masterfrom
JesseAlderliesten:master

Conversation

@JesseAlderliesten

Copy link
Copy Markdown

Running tinytest::test_all() gives the error Error in setwd(dir) : cannot change working directory if directory inst/tinytest is not present, and the error Error in structure(unlist(test_output, recursive = FALSE), class = "tinytests", : attempt to set an attribute on NULL if directory inst/tinytest is present but contains no test files.

After the fix in the pull request, the errors become the informative dir './/inst/tinytest' does not exist or is a file and dir './/inst/tinytest' does not contain test files, respectively.

This is achieved by checking for existence of the directory and for the presence of test files.

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

Successfully merging this pull request may close these issues.

1 participant