Skip to content

Commit 589a33b

Browse files
Don't print()
1 parent 111e7ef commit 589a33b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/testthat/test-public_api.R

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,21 @@ test_that("styler can style Rmd file", {
130130
}))
131131

132132
capture_output(expect_warning(
133-
styled <- style_file(testthat_file("public-api", "xyzfile_rmd", "random2.Rmd"), strict = FALSE)
133+
styled <- style_file(testthat_file("public-api", "xyzfile_rmd",
134+
"random2.Rmd"), strict = FALSE)
134135
))
135136
expect_false(styled$changed)
136137
})
137138

138139
test_that("styler handles malformed Rmd file and invalid R code in chunk", {
139140
capture_output(expect_warning(
140-
style_file(testthat_file("public-api", "xyzfile_rmd", "random3.Rmd"), strict = FALSE)
141+
style_file(testthat_file("public-api", "xyzfile_rmd", "random3.Rmd"), strict
142+
= FALSE)
141143
))
142144

143145
capture_output(expect_warning(
144-
style_file(testthat_file("public-api", "xyzfile_rmd", "random4.Rmd"), strict = FALSE)
146+
style_file(testthat_file("public-api", "xyzfile_rmd", "random4.Rmd"), strict
147+
= FALSE)
145148
))
146149
})
147150

@@ -205,7 +208,6 @@ test_that("Messages can be suppressed", {
205208
output <- catch_style_file_output(c(
206209
"public-api", "xyzdir-dirty", "dirty-sample-with-scope-spaces.R"
207210
), encoding = encoding)
208-
print(output)
209211
expect_equal(output, character(0))
210212
}
211213
)
@@ -288,18 +290,21 @@ test_that("styler can style Rnw file", {
288290
}))
289291

290292
capture_output(expect_warning(
291-
styled <- style_file(testthat_file("public-api", "xyzfile-rnw", "random2.Rnw"), strict = FALSE)
293+
styled <- style_file(testthat_file("public-api", "xyzfile-rnw",
294+
"random2.Rnw"), strict = FALSE)
292295
))
293296
expect_false(styled$changed)
294297
})
295298

296299
test_that("styler handles malformed Rnw file and invalid R code in chunk", {
297300
capture_output(expect_warning(
298-
style_file(testthat_file("public-api", "xyzfile-rnw", "random3.Rnw"), strict = FALSE)
301+
style_file(testthat_file("public-api", "xyzfile-rnw", "random3.Rnw"), strict
302+
= FALSE)
299303
))
300304

301305
capture_output(expect_warning(
302-
style_file(testthat_file("public-api", "xyzfile-rnw", "random4.Rnw"), strict = FALSE)
306+
style_file(testthat_file("public-api", "xyzfile-rnw", "random4.Rnw"), strict
307+
= FALSE)
303308
))
304309
})
305310

0 commit comments

Comments
 (0)