From 2c2dcd14e4783cf2e12963efe253be2c4fbe380b Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Mon, 14 Oct 2024 14:21:51 +0100 Subject: [PATCH] soft test for SWC url * this sometimes isn't available * I don't think tests should fail when this happens --- tests/testthat/test-neuron-io.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-neuron-io.R b/tests/testthat/test-neuron-io.R index cdca449e..53bf88c0 100644 --- a/tests/testthat/test-neuron-io.R +++ b/tests/testthat/test-neuron-io.R @@ -391,8 +391,9 @@ test_that("we can write neuron to swc file",{ #Check if the URL exists if(nzchar(Sys.getenv("NAT_INTERNET_TESTS"))) { - expect_true(url_ok(swc_url))} - + if(!url_ok(swc_url)) + warning("Unable to access swc URL: ", swc_url) + } expect_equal(write.neuron(y, dir=td, format='swc', file='rhubarb'), file.path(td,'rhubarb.swc'))