From c37e9c1afed726bd1e8e0a15826dd29f2d92d1c7 Mon Sep 17 00:00:00 2001 From: "Alec L. Robitaille" Date: Wed, 18 Sep 2024 22:20:30 -0300 Subject: [PATCH] try fix with copy --- tests/testthat/test-fusion-id.R | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-fusion-id.R b/tests/testthat/test-fusion-id.R index a01f20e1..b11383f9 100644 --- a/tests/testthat/test-fusion-id.R +++ b/tests/testthat/test-fusion-id.R @@ -19,9 +19,7 @@ edges <- edge_dist( dyad_id(edges, 'ID1', 'ID2') test_that('edges is required', { - expect_error(fusion_id( - edges = NULL - ), + expect_error(fusion_id(), 'input edges required') }) @@ -88,9 +86,9 @@ test_that('returns a numeric fusionID column', { }) test_that('message if fusionID column already present, overwritten', { - edges[, fusionID := 42] + fusionID_present <- copy(edges)[, fusionID := 42] expect_message(fusion_id( - edges = edges, + edges = fusionID_present, threshold = 50 ), 'fusionID column will be overwritten by this function') })