File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,18 @@ testthat::describe("get_output", {
1919 testthat :: expect_true(rlang :: is_reference(get_outputs(q1 )[[2 ]], q1 $ b ))
2020 })
2121
22- testthat :: it(" implicitly printed S4 object is returned asis in a list and identical to the one in the environment" , {
22+ # it cannot have a package prefix here until upstream bug in testthat is solved
23+ it(" implicitly printed S4 object is returned asis in a list and identical to the one in the environment" , {
24+ methods :: setClass ("NewS4Class ", slots = list(value = "numeric"))
25+ withr :: defer(removeClass(" NewS4Class" ))
2326 q <- qenv()
2427 q1 <- eval_code(
2528 q ,
2629 expression(
27- methods :: setClass ("NewS4Class ", slots = list(value = "numeric")),
2830 new_obj <- methods :: new(" NewS4Class" , value = 42 ),
2931 new_obj
3032 )
3133 )
32- withr :: defer(removeClass(" NewS4Class" ))
3334 testthat :: expect_identical(get_outputs(q1 ), unname(as.list(q1 )))
3435 testthat :: expect_true(rlang :: is_reference(get_outputs(q1 )[[1 ]], q1 $ new_obj ))
3536 testthat :: expect_s4_class(get_outputs(q1 )[[1 ]], " NewS4Class" )
You can’t perform that action at this time.
0 commit comments