tests/testthat/setup_utils.R

try_auth <- function() {
	skipit <- TRUE
	
	user <- try(get_username())
	
	if(!inherits(user, "try-error")) {
		skipit <- !initialize_sciencebase_session()
	}
	
	if(skipit) {
		skip("Authenticated tests skipped due to lack of login info")
	}
}

Try the sbtools package in your browser

Any scripts or data that you put into this service are public.

sbtools documentation built on Aug. 8, 2025, 6:46 p.m.