From dbb3c0357f8cd148ebfd9806e4feac5248a07a1a Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Wed, 7 Feb 2024 17:38:56 -0500 Subject: [PATCH] Remove unnecessary `svg()` calls in tests --- tests/testthat/test-independent-testing-as_rtf_pageby.R | 4 +--- tests/testthat/test-independent-testing-rtf_nrow.R | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/testthat/test-independent-testing-as_rtf_pageby.R b/tests/testthat/test-independent-testing-as_rtf_pageby.R index 009752c..80de328 100644 --- a/tests/testthat/test-independent-testing-as_rtf_pageby.R +++ b/tests/testthat/test-independent-testing-as_rtf_pageby.R @@ -1,5 +1,5 @@ library(dplyr) -svg(tempfile("tmp.svg")) + test_that("Test for case when output has title, footnote and source", { x <- iris[1:2, ] |> rtf_title("Title") |> @@ -136,5 +136,3 @@ test_that("Test when using subline_by and page_by with pageby_row = 'first_row' expect_snapshot_output(tbl2$body) }) - -dev.off() diff --git a/tests/testthat/test-independent-testing-rtf_nrow.R b/tests/testthat/test-independent-testing-rtf_nrow.R index f0779f0..46dd7e3 100644 --- a/tests/testthat/test-independent-testing-rtf_nrow.R +++ b/tests/testthat/test-independent-testing-rtf_nrow.R @@ -1,5 +1,4 @@ # create testing example -svg(tempfile("tmp.svg")) font <- 2:3 format <- matrix(c("", "i", "b", "ib"), nrow = 4, ncol = 2, byrow = FALSE) @@ -174,5 +173,3 @@ test_that("test for rtf-nrow() if 'rtf-nrow' attributes are added correctly for test_that("test for rtf-nrow() if 'rtf-nrow' attributes are added correctly for pageby_row table", { expect_equal(irspagebyrows[1], 1) }) - -dev.off()