1- test_that( " can run create_loupe_from_seurat " , {
1+ create_default_seurat_obj <- function () {
22 barcode_count <- 3
33
44 count_mat <- create_count_mat(100 , barcode_count , valid_barcodes = TRUE )
@@ -9,23 +9,38 @@ test_that("can run create_loupe_from_seurat", {
99 obj [[" proj1" ]] <- proj
1010 obj [[" cluster1" ]] <- cluster
1111
12+ obj
13+ }
14+
15+ test_that(" can run create_loupe_from_seurat" , {
1216 # create eula lock file to avoid interactive setup
1317 eula_create()
1418
19+ obj <- create_default_seurat_obj()
1520 x <- create_loupe_from_seurat(obj , executable_path = get_executable_path())
1621 expect(x , " create_loupe_from_seurat returns TRUE" )
1722})
1823
24+ test_that(" can run create_loupe with spaces in output_name" , {
25+ # create eula lock file to avoid interactive setup
26+ eula_create()
27+
28+ obj <- create_default_seurat_obj()
29+ x <- create_loupe_from_seurat(obj , executable_path = get_executable_path(), output_name = " name with spaces" )
30+ expect(x , " create_loupe_from_seurat returns TRUE" )
31+ })
32+
1933test_that(" can run create_loupe" , {
34+ # create eula lock file to avoid interactive setup
35+ eula_create()
36+
2037 barcode_count <- 5
2138 count_mat <- create_count_mat(100 , barcode_count , valid_barcodes = TRUE )
2239 proj <- create_dense_mat(barcode_count , 2 )
2340 clusters <- list (" f1" = factor (c(" a" , " c" , " b" , " a" , " b" ), levels = c(" a" , " b" , " c" ), ordered = TRUE ))
2441 projections <- list (" p1" = proj )
2542
26- # create eula lock file to avoid interactive setup
27- eula_create()
28-
2943 x <- create_loupe(count_mat , clusters = clusters , projections = projections , executable_path = get_executable_path())
3044 expect(x , " create_loupe returns TRUE" )
3145})
46+
0 commit comments