Running ‘testthat.R’ [2s/39s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rdflib)
  > 
  > test_check("rdflib")
  ── 1. Error: @id is not a URI, we should get localhost (@test-parse-serialize.R#
  jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.
  1: rdf_parse(ex, "jsonld") at testthat/test-parse-serialize.R:132
  2: jsonld::jsonld_to_rdf(doc, options = list(base = getOption("rdflib_base_uri", "localhost://"), 
         format = "application/nquads"))
  3: ctx$call("r_to_rdf", doc, options)
  4: this$eval(src)
  5: get_str_output(context_eval(join(src), private$context))
  6: context_eval(join(src), private$context)
  
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: curl::curl_fetch_memory(url, handle = h)
   2: (function (url) {    h <- curl::new_handle()    if (isTRUE(getOption("jsonld_use_accept", TRUE)))         curl::handle_setheaders(h, Accept = "application/ld+json, application/json")    req <- curl::curl_fetch_memory(url, handle = h)    if (req$status >= 400) {        json <- rawToChar(req$content)        if (jsonlite::validate(json)) {            data <- jsonlite::fromJSON(json)            if (length(data$message))                 stop(sprintf("(%s) %s", url, data$message))        }        stop(sprintf("Download (HTTP %d): %s", req$status, url))    }    headers <- curl::parse_headers_list(req$headers)    list(content_type = jsonlite::unbox(headers[["content-type"]]),         link = jsonlite::unbox(headers[["link"]]), final_url = jsonlite::unbox(req$url),         response_text = jsonlite::unbox(rawToChar(req$content)))})(url = "http://schema.org/")
   3: do.call(FUN, ARGS)
   4: (function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"http://schema.org/\"}")
   5: evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"http://schema.org/\"}"),     <environment>)
   6: evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"http://schema.org/\"}"),     <environment>)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch(evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"http://schema.org/\"}"),     <environment>), error = function (x) x, interrupt = function (x) x)
  14: context_eval(join(src), private$context)
  15: get_str_output(context_eval(join(src), private$context))
  16: this$eval(src)
  17: ctx$call("r_to_rdf", doc, options)
  18: jsonld::jsonld_to_rdf(doc, options = list(base = getOption("rdflib_base_uri",     "localhost://"), format = "application/nquads"))
  19: rdf_parse(ex, "jsonld")
  20: eval(code, test_env)
  21: eval(code, test_env)
  22: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  28: tryCatchList(expr, classes, parentenv, handlers)
  29: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  30: test_code(desc, code, env = parent.frame())
  31: testthat::test_that("@id is a URI, we should not get localhost",     {        ex <- "{\n      \"@context\": \"http://schema.org/\",\n      \"@id\": \"uri:person_id\",\n      \"name\": \"Jane Doe\"\n    }"        rdf <- rdf_parse(ex, "jsonld")        testthat::expect_false(grepl("localhost", format(rdf,             "nquads")))        rdf_free(rdf)    })
  32: eval(code, test_env)
  33: eval(code, test_env)
  34: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  35: doTryCatch(return(expr), name, parentenv, handler)
  36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  37: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  38: doTryCatch(return(expr), name, parentenv, handler)
  39: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  40: tryCatchList(expr, classes, parentenv, handlers)
  41: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  42: test_code(NULL, exprs, env)
  43: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  44: force(code)
  45: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  46: FUN(X[[i]], ...)
  47: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  48: force(code)
  49: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  50: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  51: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  52: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  53: test_check("rdflib")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault