@@ -68,6 +68,22 @@ test_that("summary_factor_variable", {
6868 expect_equal(res $ sim3 $ `count of '3'` , 1154 )
6969})
7070
71+ context(" ds.summary::smk::summary of a list variable" )
72+ ds.asList(x.name = ' D$PM_BMI_CATEGORICAL' , newobj = " a_list" )
73+ res <- ds.summary(x = ' a_list' )
74+ test_that(" summary_list_variable" , {
75+ expect_length(res , 3 )
76+ expect_length(res $ sim1 , 2 )
77+ expect_equal(res $ sim1 $ class , " list" )
78+ expect_equal(res $ sim1 $ length , 2163 )
79+ expect_length(res $ sim2 , 2 )
80+ expect_equal(res $ sim2 $ class , " list" )
81+ expect_equal(res $ sim2 $ length , 3088 )
82+ expect_length(res $ sim3 , 2 )
83+ expect_equal(res $ sim3 $ class , " list" )
84+ expect_equal(res $ sim3 $ length , 4128 )
85+ })
86+
7187context(" ds.summary::smk::summary of a data frame" )
7288res <- ds.summary(x = ' D' )
7389test_that(" summary_data_frame" , {
@@ -85,7 +101,7 @@ test_that("summary_data_frame", {
85101context(" ds.summary::smk::teardown" )
86102
87103test_that(" shutdown" , {
88- ds_expect_variables(c(" D" , " a_character" , " a_factor" ))
104+ ds_expect_variables(c(" D" , " a_character" , " a_factor" , " a_list " ))
89105})
90106
91107disconnect.studies.dataset.cnsim()
0 commit comments