From fb3ccf951ff31f54ffa1f9f462872854a9a08b1c Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Wed, 19 Jun 2024 19:41:18 +0100 Subject: [PATCH] actually move later to suggests --- DESCRIPTION | 3 +-- tests/tests.R | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b46806714..e221f0223 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -30,10 +30,9 @@ SystemRequirements: 'libnng' >= 1.6 and 'libmbedtls' >= 2.5, or 'cmake' and 'xz' to compile NNG and/or Mbed TLS included in package sources Depends: R (>= 3.5) -LinkingTo: - later Suggests: knitr, + later, markdown VignetteBuilder: knitr RoxygenNote: 7.3.1 diff --git a/tests/tests.R b/tests/tests.R index e8216eca1..123708404 100644 --- a/tests/tests.R +++ b/tests/tests.R @@ -11,6 +11,7 @@ nanotestp <- function(x) invisible(is.character(capture.output(print(x))) || sto nanotestxp <- function(x) invisible(typeof(x) == "externalptr" || stop("is not of type 'externalptr' as expected")) nanotesterr <- function(x, e = "") invisible(grepl(e, tryCatch(x, error = identity)[["message"]], fixed = TRUE) || stop("expected error message '", e, "' not generated")) +later <- requireNamespace("later", quietly = TRUE) nng_version() nanotestnano(n <- nano("req", listen = "inproc://nanonext", autostart = FALSE)) @@ -250,7 +251,7 @@ nanotestn(unlist(next_config())) nanotesterr(next_config(NULL, class = 1L), "must be a character string") nanotestaio(cs <- request(req$context, "test", send_mode = "next", cv = cv, timeout = 500)) -# nanotestaio(set_promise_context(cs, environment())) +if (later) nanotestaio(set_promise_context(cs, environment())) nanotestnn(cs$data) nanotest(typeof(ctxn <- .context(rep)) == "externalptr") nanotestaio(cr <- recv_aio(ctxn, cv = cv, timeout = 500)) @@ -531,7 +532,7 @@ nanotesterr(collect_aio_(list("a")), "object is not an Aio or list of Aios") nanotesterr(collect_aio(list(fakesock)), "object is not an Aio or list of Aios") nanotestn(stop_aio("a")) nanotestn(stop_aio(list("a"))) -# nanotest(is.environment(set_promise_context(new.env(), new.env()))) +if (later) nanotest(is.environment(set_promise_context(new.env(), new.env()))) pem <- "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----" test_tls <- function(pem) {