[Stacomir-commits] r521 - in pkg/stacomir/tests: . testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 28 10:13:03 CEST 2018


Author: legrand
Date: 2018-09-28 10:13:01 +0200 (Fri, 28 Sep 2018)
New Revision: 521

Removed:
   pkg/stacomir/tests/testthat.R
Modified:
   pkg/stacomir/tests/
   pkg/stacomir/tests/testthat/test-00-stacomir.R
   pkg/stacomir/tests/testthat/test-00-zrefclasses.R
Log:
Try to resolve error on cran


Property changes on: pkg/stacomir/tests
___________________________________________________________________
Added: svn:ignore
   + testthat.R


Modified: pkg/stacomir/tests/testthat/test-00-stacomir.R
===================================================================
--- pkg/stacomir/tests/testthat/test-00-stacomir.R	2018-09-27 14:33:26 UTC (rev 520)
+++ pkg/stacomir/tests/testthat/test-00-stacomir.R	2018-09-28 08:13:01 UTC (rev 521)
@@ -1,6 +1,7 @@
 context("stacomi base connection")
 
 test_that("Test existence of csv file",{
+	  skip_on_cran()
 	  filecsv<-"C:/Program Files/stacomi/calcmig.csv";
 	  expect_equivalent(file.access(filecsv,0),0)
 	}
@@ -10,6 +11,7 @@
 #the program will set time to GMT, this will cause some errors hard to understand in some of 
 # the classes (report_mig, report_mig_mult), with the following you can check this problem
 test_that("Test that the program is running under the right locale",{
+	  skip_on_cran()
 	  expect_equal(Sys.getlocale(category = "LC_TIME"),"French_France.1252")			
 	}
 )
@@ -34,6 +36,7 @@
 context("Database connection")
 
 test_that("Test that stacomirtools connects",{
+	  skip_on_cran()
 	  require(stacomiR)
       envir_stacomi <- new.env(parent = asNamespace("stacomiR"))
 	  mylinks=chargecsv(database_expected=TRUE)
@@ -90,6 +93,7 @@
 	})
 
 test_that("Test that gWidget loginwindow is loaded ",{
+	  skip_on_cran()
 	  require(stacomiR)
 	  stacomi(gr_interface=TRUE,login_window=TRUE,database_expected=TRUE)
 	  expect_true(exists("logw",envir_stacomi))
@@ -97,6 +101,7 @@
 	})
 
 test_that("Test that gWidget gr_interface is loaded, without database_expected, nor login window",{
+	  skip_on_cran()
 	  require(stacomiR)
 	  stacomi(gr_interface=TRUE,login_window=FALSE,database_expected=FALSE)
 	  expect_true(exists("win",envir_stacomi))			
@@ -104,6 +109,7 @@
 	})
 
 test_that("gWidget gr_interface is loaded, with pre launch_test, but without login window",{
+	  skip_on_cran()
 	  require(stacomiR)
 	  stacomi(gr_interface=TRUE,login_window=FALSE,database_expected=TRUE)
 	  expect_true(exists("win",envir_stacomi))

Modified: pkg/stacomir/tests/testthat/test-00-zrefclasses.R
===================================================================
--- pkg/stacomir/tests/testthat/test-00-zrefclasses.R	2018-09-27 14:33:26 UTC (rev 520)
+++ pkg/stacomir/tests/testthat/test-00-zrefclasses.R	2018-09-28 08:13:01 UTC (rev 521)
@@ -36,6 +36,7 @@
 
 test_that("Test that ref_df choice_c method loads character, numeric, but not rubbish",
 	{
+	  skip_on_cran()
 	  require(stacomiR)
 	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
 	  ref_df<-new("ref_df")

Deleted: pkg/stacomir/tests/testthat.R
===================================================================
--- pkg/stacomir/tests/testthat.R	2018-09-27 14:33:26 UTC (rev 520)
+++ pkg/stacomir/tests/testthat.R	2018-09-28 08:13:01 UTC (rev 521)
@@ -1,56 +0,0 @@
-#install.packages("testthat",dependencies=c("Depends", "Imports"))
-#install.packages("relax")
-require(testthat)
-require(stacomiR)
-
-#getUsername <- function(){
-#  name <- Sys.info()[["user"]]
-#  return(name)
-#}
-#if(getUsername() == 'cedric.briand')
-#{
-#  setwd("C:/workspace/stacomir/pkg/stacomir/")
-#}
-#if(getUsername() == 'marion.legrand')
-#{
-#  setwd("C:/Users/logrami/workspace/stacomir/pkg/stacomir/")
-#}
-#
-#
-## to launch all
-#
-#
-#if(getUsername() == 'cedric.briand')
-#{
-#  skip_on_cran()	
-#  test_dir("C:/workspace/stacomir/pkg/stacomir/tests/testthat")
-#}
-#if(getUsername() == 'marion.legrand')
-#{
-#  skip_on_cran()
-#  test_dir("C:/Users/logrami/workspace/stacomir/pkg/stacomir/tests/testthat")
-#}
-
-test_check("stacomiR")
-
-
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-00-stacomir.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-00-zrefclasses.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-01-report_mig_mult.R"))
-## warning we don't need to be worried about
-##Quoted identifiers should have class SQL, use DBI::SQL() if the caller performs the quoting.
-## this comes from incompatibility between  RSQLite 1.1-1 and sqldf
-## we don't really use RSQLite and this is only a warning not a problem
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-02-report_mig.R"))
-## if errors check existence of dbname test and grants to test on dbname test
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-03-report_df.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-04-report_dc.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-05-report_sample_char.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-06-report_mig_interannual.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-07-report_sea_age.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-08-report_silver_eel.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-09-report_annual.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-10-report_env.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-11-report_mig_env.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-12-report_mig_char.R"))
-#test_file(stringr::str_c(getwd(),"/tests/testthat/test-13-report_species.R"))



More information about the Stacomir-commits mailing list