Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/r-assist/errorist
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Feb 6, 2020
2 parents 0b4233b + f2e336c commit 8a41cb8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: errorist
Title: Automatically Search Errors or Warnings
Version: 0.1.0
Version: 0.0.3
Authors@R: c(
person("James", "Balamuta",
email = "[email protected]",
Expand Down
7 changes: 4 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# errorist 0.1.0
# errorist 0.0.3

## Features
## Bug Fix

- TBA
- Address an erroneous unit test that was comparing functions within namespaces
instead of environments.

# errorist 0.0.2

Expand Down
10 changes: 6 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
## Test environments

- local OS X install, R 3.5.2
- ubuntu 14.04 (on travis-ci), R 3.5.2
- local OS X install, R 3.6.2
- ubuntu 14.04 (on travis-ci), R 3.6.2
- win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 0 note

- This release is meant to resolve an import issue on the CRAN checks page.
- This release is meant to resolve an issue with one of the unit tests
on the CRAN checks page.
-

## Reverse dependencies

This is a new release, so there are no reverse dependencies.
There are no reverse dependencies.
8 changes: 2 additions & 6 deletions tests/testthat/test-handlers.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ test_that("Check Output from Functions", {
# Retrieve the function
test_error_function = test_error_call[[1]]

# Retrieve function name space
# See: https://stackoverflow.com/a/6433626/1345455
get_function_namespace = function(func) { getNamespaceName(environment(func)) }

expect_true(is.function(options_default_function),
"Verify the default error handler is a function.")

expect_true(get_function_namespace(test_error_function) ==
get_function_namespace(options_default_function) ,
expect_true(identical(environment(test_error_function),
environment(options_default_function)),
"Verify that test function call matches the default function's environment")

expect_equal(test_error_function("toad"), options_default_function("toad"),
Expand Down

0 comments on commit 8a41cb8

Please sign in to comment.