brodieG / unitizer

Easy R Unit Tests
Other
39 stars 7 forks source link

Add tests for multi-unitizer upgrades #283

Closed brodieG closed 2 years ago

brodieG commented 3 years ago

Seems like we introduced a regression with 1.4.15 that would prevent multiple unitizers from upgrading.

brodieG commented 2 years ago
--- a/R/load.R
+++ b/R/load.R
@@ -153,7 +153,7 @@ load_unitizers <- function(
   for(i in valid.idx) {
     unitizers[[i]]@id <- norm_store_id(store.ids[[i]])
     unitizers[[i]]@test.file.loc <- norm_file(test.files[[i]])
-    unitizers[[i]]@best.name <- chr.ids[valid.idx]
+    unitizers[[i]]@best.name <- chr.ids[i]
     unitizers[[i]]@show.progress <- show.progress

     parent.env(unitizers[[i]]@zero.env) <- par.frame

This should fixed it (in devel), but haven't added tests (I think)