Skip to content

Commit 09e6272

Browse files
committed
Remove workarounds in tests for generation issues
1 parent a198f43 commit 09e6272

3 files changed

Lines changed: 2 additions & 15 deletions

File tree

tests/testthat/helper-py-R-equivalences.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ r_generate_dataset <- function(n_obs, n_vars, write = FALSE, ...) {
4242
n_vars,
4343
x_type = check_arg(args, "x_type", "numeric_matrix"),
4444
layer_types = check_arg(args, "layer_types", character()),
45-
obs_types = ifelse("obs_types" %in% names(args), args$obs_types, "integer"),
46-
var_types = ifelse("var_types" %in% names(args), args$var_types, "integer"),
45+
obs_types = check_arg(args, "obs_types", character()),
46+
var_types = check_arg(args, "var_types", character()),
4747
obsm_types = check_arg(args, "obsm_types", character()),
4848
varm_types = check_arg(args, "varm_types", character()),
4949
obsp_types = check_arg(args, "obsp_types", character()),

tests/testthat/test-roundtrip-obsmvarm.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,6 @@ for (name in test_names) {
195195
obsm_types = list(r_name),
196196
varm_types = list(r_name)
197197
)
198-
# TODO: Remove this once issue #286 is fixed https://github.com/scverse/anndataR/issues/286
199-
if (!(r_name %in% names(vector_generators))) {
200-
adata_r$varm[[r_name]] <- generate_matrix(20, 20, r_name)
201-
}
202198
write_h5ad(adata_r, file_r2, mode = "w")
203199

204200
# Remove the rhdf5-NA.OK for comparison

tests/testthat/test-roundtrip-obsvar.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,6 @@ for (name in test_names) {
165165
obs_types = list(r_name),
166166
var_types = list(r_name)
167167
)
168-
# TODO: Fix when issue #289 is fixed https://github.com/scverse/anndataR/issues/289
169-
if (r_name %in% c("logical", "logical_with_nas")) {
170-
adata_r$obs[[r_name]] <- rep(c(TRUE, FALSE), 5)
171-
adata_r$var[[r_name]] <- rep(c(TRUE, FALSE), 10)
172-
if (r_name == "logical_with_nas") {
173-
adata_r$obs[[r_name]][1] <- NA
174-
adata_r$var[[r_name]][1] <- NA
175-
}
176-
}
177168

178169
write_h5ad(adata_r, file_r2)
179170

0 commit comments

Comments
 (0)