[Stacomir-commits] r533 - pkg/stacomir/tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Oct 2 11:01:41 CEST 2018


Author: legrand
Date: 2018-10-02 11:01:39 +0200 (Tue, 02 Oct 2018)
New Revision: 533

Modified:
   pkg/stacomir/tests/testthat/test-02-report_mig.R
   pkg/stacomir/tests/testthat/test-03-report_df.R
   pkg/stacomir/tests/testthat/test-04-report_dc.R
Log:


Modified: pkg/stacomir/tests/testthat/test-02-report_mig.R
===================================================================
--- pkg/stacomir/tests/testthat/test-02-report_mig.R	2018-10-02 07:28:33 UTC (rev 532)
+++ pkg/stacomir/tests/testthat/test-02-report_mig.R	2018-10-02 09:01:39 UTC (rev 533)
@@ -24,6 +24,7 @@
 
 
 test_that("Test an instance of report_mig, check that operations accross two years are split correcly",{
+	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
 	  # overriding user schema to point to iav
 	  baseODBC<-get("baseODBC",envir=envir_stacomi)

Modified: pkg/stacomir/tests/testthat/test-03-report_df.R
===================================================================
--- pkg/stacomir/tests/testthat/test-03-report_df.R	2018-10-02 07:28:33 UTC (rev 532)
+++ pkg/stacomir/tests/testthat/test-03-report_df.R	2018-10-02 09:01:39 UTC (rev 533)
@@ -65,15 +65,17 @@
 
 
 test_that("report_df summary method works",{
+	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
 	  data(r_df)
 	  r_df<-r_df
-	  expect_output(summary(r_df,silent=FALSE),"summary")
+	  expect_output(summary(r_df,silent=TRUE),"summary")
       rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
 test_that("report_df print method works",{
+	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
 	  data(r_df)
 	  r_df<-r_df

Modified: pkg/stacomir/tests/testthat/test-04-report_dc.R
===================================================================
--- pkg/stacomir/tests/testthat/test-04-report_dc.R	2018-10-02 07:28:33 UTC (rev 532)
+++ pkg/stacomir/tests/testthat/test-04-report_dc.R	2018-10-02 09:01:39 UTC (rev 533)
@@ -65,16 +65,17 @@
 
 
 test_that("report_dc summary method works",{
+	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
 	  data(r_dc)
 	  r_dc<-r_dc
-	  expect_output(summary(r_dc,silent=FALSE),"summary")
+	  expect_output(summary(r_dc,silent=TRUE),"summary")
       rm(list=ls(envir=envir_stacomi),envir=envir_stacomi)
 	})
 
 
 test_that("report_dc print method works",{
-	  require(stacomiR)
+	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
 	  data(r_dc)
 	  r_dc<-r_dc



More information about the Stacomir-commits mailing list