jonkeane commented on code in PR #12940:
URL: https://github.com/apache/arrow/pull/12940#discussion_r855398680


##########
r/tests/testthat/helper-skip.R:
##########
@@ -69,12 +76,14 @@ skip_on_linux_devel <- function() {
 }
 
 skip_if_r_version <- function(r_version) {
+  if (force_tests) return()
   if (getRversion() <= r_version) {
     skip(paste("R version:", getRversion()))
   }
 }
 
 process_is_running <- function(x) {
+  if (force_tests) return(TRUE)

Review Comment:
   A comment here about what is going on here would be nice, since it's 
slightly different from other places



##########
r/tests/testthat/helper-skip.R:
##########
@@ -21,7 +21,10 @@ build_features <- c(
   uncompressed = TRUE
 )
 
+force_tests <- identical(tolower(Sys.getenv("ARROW_R_FORCE_TESTS")), "true")
+
 skip_if_not_available <- function(feature) {
+  if (force_tests) return()

Review Comment:
   This is a minor style thing, but if there's an early return, we should make 
sure that goes on a separate line:
   
   ```suggestion
     if (force_tests) {
       return()
     }
   ```



##########
r/tests/testthat/helper-skip.R:
##########
@@ -21,7 +21,10 @@ build_features <- c(
   uncompressed = TRUE
 )
 
+force_tests <- identical(tolower(Sys.getenv("ARROW_R_FORCE_TESTS")), "true")

Review Comment:
   This is probably fine like it is, but if we wrapped this in a function, it 
would behave more like we expect — we wouldn't need to think about when this 
line is sourced



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to