Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the report when a test fails #3

Closed
llrs opened this issue May 1, 2018 · 44 comments
Closed

Building the report when a test fails #3

llrs opened this issue May 1, 2018 · 44 comments

Comments

@llrs
Copy link

llrs commented May 1, 2018

I was trying the package in another package where I still have some failing test (work in progress..). Could it be possible to generate the page even if a test failed?

I think it uses test_check (in case of using testthat), which has the argument of stop_on_failure set to TRUE by default. Changing stop_on_failure to FALSE would solve the issue, but maybe there is a reason behind this.

@yonicd
Copy link
Owner

yonicd commented May 1, 2018

the script is using test_dir which by default has stop_on_failure = FALSE. it may be the covr call

@yonicd
Copy link
Owner

yonicd commented May 1, 2018

fo the time being the i would suggest moving to expect_error in the testthat call until you fix your code and then once it runs switch to an affirmative test.

@yonicd
Copy link
Owner

yonicd commented May 3, 2018

i opened a new branch for this if you want to PR to it.

@yonicd
Copy link
Owner

yonicd commented Aug 24, 2018

@llrs this works now on the skip branch, you can test it out on a package you have. cc @dpastoor, @jimhester.

@llrs
Copy link
Author

llrs commented Aug 24, 2018

@yonicd thanks for the new branch. I tried and it comments a single line (the one producing the data to be tested) but not the failing test (or the expect_that line). Also the final report is not generated see below for details:


The error I get on the console:

> covrpage()


processing file: _covrpage.Rmd
  |....                                                             |   6%
   inline R code fragments

  |........                                                         |  12%
label: unnamed-chunk-1 (with options) 
List of 1
 $ include: logi FALSE

  |...........                                                      |  18%
  ordinary text without R code

  |...............                                                  |  24%
label: unnamed-chunk-2 (with options) 
List of 1
 $ include: logi FALSE

  |...................                                              |  29%
  ordinary text without R code

  |.......................                                          |  35%
label: unnamed-chunk-3 (with options) 
List of 1
 $ include: logi FALSE

  |...........................                                      |  41%
  ordinary text without R code

  |...............................                                  |  47%
label: unnamed-chunk-4 (with options) 
List of 1
 $ include: logi FALSE

  |..................................                               |  53%
  ordinary text without R code

  |......................................                           |  59%
label: unnamed-chunk-5 (with options) 
List of 1
 $ echo: logi FALSE

Quitting from lines 52-77 (_covrpage.Rmd) 
Error: Failure in `/tmp/RtmpNDFpvL/R_LIBS5d7c37dbca90/GSEAdv/GSEAdv-tests/testthat.Rout.fail`

On that file, after starting R and loading the package the output ends with:

> 
> test_check("GSEAdv")
�[31m──�[39m �[31m1. Error: keepGPP works (@test_keeps.R#9) �[39m �[31m──────────────────────────────────────────────────────────────────────────────────────────�[39m
object 'out' not found
1: expect_equal(ncol(out), 5L) at testthat/test_keeps.R:9
2: quasi_label(enquo(object), label)
3: eval_bare(get_expr(quo), get_env(quo))
4: ncol(out)

══ testthat results  ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
OK: 183 SKIPPED: 1 FAILED: 1
1. Error: keepGPP works (@test_keeps.R#9) 

Error: testthat unit tests failed
Execution halted

The relevant lines on that file are here:

test_that("keepGPP works", {
#  out <- keepGPP(Info)
  expect_equal(ncol(out), 5L)
})

The commented line was introduced by covrpage, but then the expect is failing, as it can't find the out object

@yonicd
Copy link
Owner

yonicd commented Aug 24, 2018

The intent was to have the expectation fail, you are missing there a global variable ‘out’ it is crashing for a different reason I think. Try replacing 5L with 6L.

@llrs
Copy link
Author

llrs commented Aug 24, 2018

I don't understand the comment. Why I'm missing there a global variable 'out'? Initially it wasn't commented in the test_that call, and after running the covrpage it got commented. (Doing rm(out); covrpage() resulted in the same output)

I on purpose changed the expectation in order to fail the test, if I change it back to 6L it will pass and it won't test if the branch works when a test is failing.

@yonicd
Copy link
Owner

yonicd commented Aug 24, 2018

You misunderstood me. I meant to keep it a vaild expectation test, i did not know it was 6 before you changed it. My suggestion is to keep the out object in the environment but have it try to check against something wrong on purpose. Removing out make little sense practically in a normal test file. Usually you would have out be created but with wrong dimensions and catching that error.

@llrs
Copy link
Author

llrs commented Aug 25, 2018

That is what I did initially, and still the covrpage function failed to generate the report (despite using the skip branch)

@yonicd
Copy link
Owner

yonicd commented Aug 25, 2018

Ok. Can you paste the Rout.fail lines so I can see why it is failing.

@llrs
Copy link
Author

llrs commented Aug 25, 2018

It is what I originally posted on the last block of code on my first comment after you pinged me.

> 
> test_check("GSEAdv")
�[31m──�[39m �[31m1. Error: keepGPP works (@test_keeps.R#9) �[39m �[31m──────────────────────────────────────────────────────────────────────────────────────────�[39m
object 'out' not found
1: expect_equal(ncol(out), 5L) at testthat/test_keeps.R:9
2: quasi_label(enquo(object), label)
3: eval_bare(get_expr(quo), get_env(quo))
4: ncol(out)

══ testthat results  ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
OK: 183 SKIPPED: 1 FAILED: 1
1. Error: keepGPP works (@test_keeps.R#9) 

Error: testthat unit tests failed
Execution halted

@yonicd
Copy link
Owner

yonicd commented Aug 25, 2018

That is saying out is missing. Can you rerun wo commenting out that line in the test?

@yonicd
Copy link
Owner

yonicd commented Aug 25, 2018

test_that("keepGPP works", {
out <- keepGPP(Info)
expect_equal(ncol(out), 5L)
})

@llrs
Copy link
Author

llrs commented Aug 25, 2018

Yes, it says that it is missing because it gets commented when I run covrpage.

When I cleaned the session and redid the covrpage again, I got some other test commented and then a failing test in another archive. These branch comments my test at its will, and some of them are test that pass.

@yonicd
Copy link
Owner

yonicd commented Aug 25, 2018

Ah, ok. So the way this works is to

run testthat locate failed tests
comment out the lines
run covr
uncomment the lines

The tests are mapped out using covrpage::map_testthat()

Try seeing that the lines are being mapped correctly to that test. It seemed to work ok on my end.

@yonicd
Copy link
Owner

yonicd commented Aug 26, 2018

ok. try again (repull). I noticed that i wrote map_test for files that have full namespacing for all function calls ie testthat::test_that and most of the time users will have just test_that which creates a bit of a different logic in the parser. This is what caused the seemingly random commenting of your file.

now the mapping should work for both types of inputs.

thanks for being the tester for this.

@llrs
Copy link
Author

llrs commented Aug 26, 2018

I installed from the latest version of the branch, but I got the same error: Error: Failure in in the file I found that the failing test is failing and nothing else (as previously happened, but now without random commenting):

══ testthat results  ════════════════════════════════════════════════════════════════════════
OK: 185 SKIPPED: 1 FAILED: 1
1. Failure: keepGPP works (@test_keeps.R#9) 

Error: testthat unit tests failed
Execution halted

@yonicd
Copy link
Owner

yonicd commented Aug 26, 2018

errr... what is the GH url of the repo are you testing? testthat should be failing that is the point, but covr should be running ok, ignoring that test.

@llrs
Copy link
Author

llrs commented Aug 26, 2018

I am using :

covrpage      * 0.0.51     2018-08-26 Github (yonicd/covrpage@b4a47d2) 
testthat      * 2.0.0      2017-12-13 CRAN (R 3.5.0)           

@yonicd
Copy link
Owner

yonicd commented Aug 26, 2018

my mistake. i didnt return the mapping directory to the right place. I also added some functionality that the function will cleanup itself all the commenting, even if it crashing during the covr build.

try again (hopefully the last time)

@llrs
Copy link
Author

llrs commented Aug 26, 2018

No, I get the same error "yonicd/covrpage@111cb6b", it only adds a new line at the end of a test I have

@yonicd
Copy link
Owner

yonicd commented Aug 26, 2018

Are you testing covrpage or your package?

@yonicd
Copy link
Owner

yonicd commented Aug 26, 2018

i have tried it on a few repos i checked out that i can manipulate the tests. for example @jonocarroll hosts ggeasy. I changed line 43 in test_labs to throw an error.

I run the new function in the root repo directory. It is acting as expected.

> covrpage::coverage_skip(test_path = 'tests/testthat')
✔ | OK F W S | Context|  3 1     | attr labs
──────────────────────────────────────────────────────────────────────────────────────────────
test-labs.R:43: failure: regular labs pass new labels through easy_labs 
`easy_res` not equal to `hard_res`.
Componentlabels: Componenttitle: 1 string mismatch
──────────────────────────────────────────────────────────────────────────────────────────────
✔ |  9       | remove legend [0.2 s]
✔ |  9       | remove axes [0.2 s]

══ Results ═══════════════════════════════════════════════════════════════════════════════════
Duration: 0.5 s

OK:       21
Failed:   1
Warnings: 0
Skipped:  0

No-one is perfect!
ggeasy Coverage: 84.21%
R/axis.R: 55.88%
R/labs.R: 95.00%
R/legend.R: 100.00%

@llrs
Copy link
Author

llrs commented Aug 27, 2018

Oh, sorry I was trying the covrpage not the covrpage_skip function.
When I try the covrpage_skip function on my package, I see some errors could not find function "condPerPathways" (those are S4 methods not functions), then it outputs:

══ Terminating early ══════════════════════════════════════════════════
Too many failures

but on the linked file I have has the same error:

══ testthat results  ═════════════════════════════════════════════════════════════════
OK: 149 SKIPPED: 9 FAILED: 1
1. Failure: keepGPP works (@test_keeps.R#9) 

Error: testthat unit tests failed
Execution halted

@yonicd
Copy link
Owner

yonicd commented Aug 27, 2018

no worries, i added coverage_skip in the last few commits. It can be used as a more direct way to test covr with failing tests. It could be that testthat aborts when it reaches a threshold of failing tests.

a small caveat to coverage_skip is that it needs to run from the root directory of the package that it is testing (unlike covrpage that can be run with relational paths)

do the tests work in a regular context without force failing them?

@ColinFay
Copy link

Hey,

The function seems to fail if you simply do covrpage::coverage_skip(test_path = "tests/") but works when I run covrpage::coverage_skip(test_path = "tests/testthat/").

@yonicd
Copy link
Owner

yonicd commented Aug 27, 2018

I changed to default path of coverage_skip to tests/testthat to make it a more natural run by default. 05a5814

@llrs
Copy link
Author

llrs commented Aug 27, 2018

@yonicd Yes, When I change back to the right value the devtools::test (using Rstudio) works as well as the covrpage::covrpage while covrpage::coverage_skip() fails.

Many thanks for your long and continued effort to solve this issue!

@yonicd
Copy link
Owner

yonicd commented Aug 27, 2018

what test path are you setting in the coverage_skip call and what directory are you running it from?

@llrs
Copy link
Author

llrs commented Aug 27, 2018

I am using covrpage::coverage_skip(test_path = "tests/testthat/") on the root of the package.

I get

══ Terminating early ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Too many failures
GSEAdv Coverage: 77.33%
R/completness.R: 0.00%
R/expand.R: 0.00%
R/summary.R: 0.00%
R/pathwaysPerGene.R: 14.29%
R/calc-nPathways.R: 33.33%
R/simulateGSC.R: 36.30%
R/check-GSC.R: 59.52%
R/keep.R: 72.00%
R/simulate2GSC.R: 78.38%
R/fromSizeGenes_sizePathways.R: 78.57%
R/as_GeneSetCollection.R: 83.33%
R/sizesPer.R: 86.11%
R/AllGenerics.R: 90.24%
R/genesPerGene.R: 90.32%
R/cond.R: 90.91%
R/fromSizePathways.R: 92.50%
R/add.R: 92.59%
R/pathway.R: 94.64%
R/remove.R: 95.65%
R/nested.R: 97.14%
R/duplicated.R: 100.00%
R/estimate_sizes.R: 100.00%
R/fromSizeGenes.R: 100.00%
R/gene.R: 100.00%
R/genesPerPathway.R: 100.00%
R/modify.R: 100.00%
R/n_functions.R: 100.00%
R/sizes.R: 100.00%
R/utilities.R: 100.00%
R/zzz.R: 100.00%

When the test is set to pass, and it fails when a test fails.

@yonicd
Copy link
Owner

yonicd commented Aug 28, 2018

is your package on a github repo that i can clone and test?

@llrs
Copy link
Author

llrs commented Aug 29, 2018

Yes, it is llrs/GSEAdv. Although the specific test file is a new one I created and I haven't pushed yet (I can't in my current network), and as it is on github it doesn't pass the R CMD check. I will be able to push changes by Friday.

Let me know if I have to do something.

@yonicd
Copy link
Owner

yonicd commented Aug 29, 2018

ok. i'll check back in on Friday to test the commit. I have had a few other people test out the current build of coverage_skip and it seems to work for them.

@llrs
Copy link
Author

llrs commented Sep 1, 2018

@yonicd I updated the package in llrs/GSEAdv, the file I change to check the function covrpage is the test on tests/testthat/test_keeps.R. Let me know if you need the sessionInfo of my setup or something.

By the way, I would like to propose this package to check Bioconductor's packages in their severs. But they only accept packages available on CRAN. Do you plan to submit it on CRAN?

@yonicd
Copy link
Owner

yonicd commented Sep 1, 2018

i will check why it is failing on that repo.

I am planning on submitting to CRAN when I get a chance.

thanks!

@yonicd
Copy link
Owner

yonicd commented Sep 2, 2018

> biocLite("GSEAdv")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
Installing package(s) ‘GSEAdvOld packages: 'digest', 'tinytex', 'batchtools', 'broom', 'callr', 'dbplyr',
  'devtools', 'energy', 'fansi', 'foreign', 'fs', 'ggplotify', 'ggtern', 'haven',
  'huxtable', 'later', 'leaflet', 'officer', 'openssl', 'pander', 'pkgconfig',
  'plotly', 'processx', 'RcppArmadillo', 'reticulate', 'rlang', 'roxygen2', 'scales',
  'sinew', 'streamR', 'subprocess', 'survival', 'sys', 'texPreview', 'usethis',
  'XML', 'xtable'
Update all/some/none? [a/s/n]: 
n
Warning message:
packageGSEAdvis not available (for R version 3.5.1) 
SessionInfo
> devtools::session_info()
Session info ------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.2.942)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2018-09-01                  

Packages ----------------------------------------------------------------------------
 package       * version date       source        
 base          * 3.5.1   2018-07-05 local         
 BiocInstaller * 1.30.0  2018-05-01 Bioconductor  
 compiler        3.5.1   2018-07-05 local         
 datasets      * 3.5.1   2018-07-05 local         
 devtools        1.13.5  2018-02-18 CRAN (R 3.5.0)
 digest          0.6.15  2018-01-28 CRAN (R 3.5.0)
 graphics      * 3.5.1   2018-07-05 local         
 grDevices     * 3.5.1   2018-07-05 local         
 memoise         1.1.0   2017-04-21 CRAN (R 3.5.0)
 methods       * 3.5.1   2018-07-05 local         
 packrat         0.4.9-3 2018-06-01 CRAN (R 3.5.0)
 stats         * 3.5.1   2018-07-05 local         
 tools           3.5.1   2018-07-05 local         
 utils         * 3.5.1   2018-07-05 local         
 withr           2.1.2   2018-03-15 CRAN (R 3.5.0)

@llrs
Copy link
Author

llrs commented Sep 2, 2018

Yes, the GSEAdv package is not yet on Bioconductor, that's why that code block was commented.
Install it from github using remotes or devtools if you want.

@yonicd
Copy link
Owner

yonicd commented Sep 2, 2018

seems ok on my end.

test_keeps.R
context("keep.R")

test_that("keepGPP works", {

})

test_that("keepGPP works", {
  out <- keepGPP(Info)
  expect_equal(ncol(out), 5L)
})
covrpage::coverage_skip()
> covrpage::coverage_skip()
✔ | OK F W S | Context|  0 3     | Testing adding method
──────────────────────────────────────────────────────────────────────────────────────
test_add.R:4: error: gene as character
unused arguments (gene = "2", pathway = "1430728")
1: .handleSimpleError(function (e) 
   {
       handled <<- TRUE
       test_error <<- e
       options(expressions = expressions_opt_new)
       on.exit(options(expressions = expressions_opt), add = TRUE)
       e$expectation_calls <- frame_calls(11, 2)
       test_error <<- e
       register_expectation(e)
       e$handled <- TRUE
       test_error <<- e
   }, "unused arguments (gene = \"2\", pathway = \"1430728\")", quote(add(Info, gene = "2", 
       pathway = "1430728"))) at tests/testthat/test_add.R:4
2: eval(code, test_env)

test_add.R:15: error: pathway as character
unused arguments (gene = c("2", "5", "7"), pathway = "156581")
1: .handleSimpleError(function (e) 
   {
       handled <<- TRUE
       test_error <<- e
       options(expressions = expressions_opt_new)
       on.exit(options(expressions = expressions_opt), add = TRUE)
       e$expectation_calls <- frame_calls(11, 2)
       test_error <<- e
       register_expectation(e)
       e$handled <- TRUE
       test_error <<- e
   }, "unused arguments (gene = c(\"2\", \"5\", \"7\"), pathway = \"156581\")", quote(add(Info, 
       gene = c("2", "5", "7"), pathway = "156581"))) at tests/testthat/test_add.R:15
2: eval(code, test_env)

test_add.R:31: error: pathway as character
unused arguments (gene = "2", pathway = c("156581", "211"))
1: expect_warning(gsc <- add(Info, gene = "2", pathway = c("156581", "211")), "Removing") at tests/testthat/test_add.R:31
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
       out$push(condition)
       invokeRestart("muffleWarning")
   })
5: eval_bare(get_expr(quo), get_env(quo))
──────────────────────────────────────────────────────────────────────────────────────
✔ |  8       | Testing list to GeneSetCollection method|  1       | calc.nPathways|  1       | Testing check-GSC methods|  1       | Testing utilities method| 16       | Testing cond* method| 22       | Testing drop method [0.1 s]
✔ |  6       | Testing duplications|  2       | estimate.n*|  3       | Testing fromSizeGenes_sizePathways|  2       | Testing fromSizeGenes method|  2       | Testing fromSizePathways method|  7       | Testing gene method|  6       | Testing genePerGene|  5       | genesPerPathway|  2       | Estimating numbers|  0 1   1 | keep.R
──────────────────────────────────────────────────────────────────────────────────────
test_keeps.R:3: skip: keepGPP works
Empty test

test_keeps.R:9: failure: keepGPP works
ncol(out) not equal to 5.
1/1 mismatches
[1] 6 - 5 == 1
──────────────────────────────────────────────────────────────────────────────────────
✔ | 12       | Testing modify method|  8       | Testing nested method|  7       | Testing pathway method| 13       | Testing simulations to create GeneSetCollections [0.3 s]
✔ | 22       | Testing sizePathways and sizeGenes|  1       | Testing summary methodnd sizeGenes| 21       | Testing utilities method

══ Results ═══════════════════════════════════════════════════════════════════════════
Duration: 1.1 s

OK:       174
Failed:   4
Warnings: 0
Skipped:  1
GSEAdv Coverage: 78.44%
R/expand.R: 0.00%
R/summary.R: 0.00%
R/pathwaysPerGene.R: 14.29%
R/calc-nPathways.R: 33.33%
R/simulateGSC.R: 39.26%
R/check-GSC.R: 71.43%
R/keep.R: 72.00%
R/simulate2GSC.R: 78.38%
R/fromSizeGenes_sizePathways.R: 78.57%
R/as_GeneSetCollection.R: 83.33%
R/sizesPer.R: 86.11%
R/AllGenerics.R: 86.67%
R/genesPerGene.R: 90.32%
R/cond.R: 90.91%
R/fromSizePathways.R: 92.50%
R/add.R: 92.59%
R/pathway.R: 94.64%
R/nested.R: 97.14%
R/remove.R: 97.67%
R/completness.R: 100.00%
R/duplicated.R: 100.00%
R/estimate_sizes.R: 100.00%
R/fromSizeGenes.R: 100.00%
R/gene.R: 100.00%
R/genesPerPathway.R: 100.00%
R/modify.R: 100.00%
R/n_functions.R: 100.00%
R/sizes.R: 100.00%
R/utilities.R: 100.00%
R/zzz.R: 100.00%
covrpage.md output

Tests and Coverage

02 September, 2018 08:52:33

This output is created by
covrpage.

Coverage

Coverage summary is created using the
covr
package.

Object Coverage (%)
GSEAdv 78.44
R/expand.R 0.00
R/summary.R 0.00
R/pathwaysPerGene.R 14.29
R/calc-nPathways.R 33.33
R/simulateGSC.R 39.26
R/check-GSC.R 71.43
R/keep.R 72.00
R/simulate2GSC.R 78.38
R/fromSizeGenes_sizePathways.R 78.57
R/as_GeneSetCollection.R 83.33
R/sizesPer.R 86.11
R/AllGenerics.R 86.67
R/genesPerGene.R 90.32
R/cond.R 90.91
R/fromSizePathways.R 92.50
R/add.R 92.59
R/pathway.R 94.64
R/nested.R 97.14
R/remove.R 97.67
R/completness.R 100.00
R/duplicated.R 100.00
R/estimate_sizes.R 100.00
R/fromSizeGenes.R 100.00
R/gene.R 100.00
R/genesPerPathway.R 100.00
R/modify.R 100.00
R/n_functions.R 100.00
R/sizes.R 100.00
R/utilities.R 100.00
R/zzz.R 100.00

Unit Tests

Unit Test summary is created using the
testthat
package.

file n time error failed skipped warning
test_add.R test_add.R 0 0.004 3 0 0 0
test_asGeneSetCollection.R test_asGeneSetCollection.R 8 0.036 0 0 0 0
test_calcnPathways.R test_calcnPathways.R 1 0.002 0 0 0 0
test_check.R test_check.R 1 0.002 0 0 0 0
test_completness.R test_completness.R 1 0.002 0 0 0 0
test_condPer.R test_condPer.R 16 0.030 0 0 0 0
test_drop.R test_drop.R 22 0.124 0 0 0 0
test_duplicates.R test_duplicates.R 6 0.009 0 0 0 0
test_estimate_sizes.R test_estimate_sizes.R 2 0.003 0 0 0 0
test_fromSizeGenes_sizePathways.R test_fromSizeGenes_sizePathways.R 3 0.015 0 0 0 0
test_fromSizeGenes.R test_fromSizeGenes.R 2 0.046 0 0 0 0
test_fromSizePathways.R test_fromSizePathways.R 2 0.032 0 0 0 0
test_gene.R test_gene.R 7 0.020 0 0 0 0
test_genesPerGene.R test_genesPerGene.R 6 0.016 0 0 0 0
test_genesPerPathway.R test_genesPerPathway.R 5 0.010 0 0 0 0
test_keep.R test_keep.R 2 0.003 0 0 0 0
test_keeps.R test_keeps.R 2 0.004 0 1 1 0
test_modify.R test_modify.R 12 0.066 0 0 0 0
test_nested.R test_nested.R 8 0.046 0 0 0 0
test_pathway.R test_pathway.R 7 0.025 0 0 0 0
test_simulations.R test_simulations.R 13 0.302 0 0 0 0
test_sizes.R test_sizes.R 22 0.060 0 0 0 0
test_sizesPer.R test_sizesPer.R 6 0.016 0 0 0 0
test_summary.R test_summary.R 1 0.005 0 0 0 0
test_utilities.R test_utilities.R 21 0.028 0 0 0 0
Show Detailed Test Results
file context test status n time
test_add.R Testing adding method gene as character ERROR 0 0.001
test_add.R Testing adding method pathway as character ERROR 0 0.001
test_add.R Testing adding method pathway as character ERROR 0 0.002
test_asGeneSetCollection.R Testing list to GeneSetCollection method info PASS 5 0.025
test_asGeneSetCollection.R Testing list to GeneSetCollection method as.GeneSetCollection PASS 3 0.011
test_calcnPathways.R calc.nPathways works PASS 1 0.002
test_check.R Testing check-GSC methods isolation PASS 1 0.002
test_completness.R Testing utilities method completness PASS 1 0.002
test_condPer.R Testing cond* method condPerGenes missing PASS 4 0.007
test_condPer.R Testing cond* method condPerGenes specific PASS 4 0.008
test_condPer.R Testing cond* method condPerPathways missing PASS 4 0.008
test_condPer.R Testing cond* method condPerPathways specific PASS 4 0.007
test_drop.R Testing drop method gene as character PASS 6 0.051
test_drop.R Testing drop method drop gene as numeric PASS 3 0.019
test_drop.R Testing drop method pathway as character PASS 2 0.010
test_drop.R Testing drop method drop pathway as numeric PASS 1 0.005
test_drop.R Testing drop method pathway as character PASS 3 0.014
test_drop.R Testing drop method pathway as character PASS 3 0.012
test_drop.R Testing drop method dropRel PASS 4 0.013
test_duplicates.R Testing duplications duplicatedPathways PASS 3 0.004
test_duplicates.R Testing duplications duplicatedGenes PASS 3 0.005
test_estimate_sizes.R estimate.n* estimate.nPathways works PASS 1 0.002
test_estimate_sizes.R estimate.n* estimate.nGenes works PASS 1 0.001
test_fromSizeGenes_sizePathways.R Testing fromSizeGenes_sizePathways fromSizeGenes_sizePathways PASS 3 0.015
test_fromSizeGenes.R Testing fromSizeGenes method fromSizeGenes PASS 2 0.046
test_fromSizePathways.R Testing fromSizePathways method fromSizePathways PASS 2 0.032
test_gene.R Testing gene method gene PASS 3 0.008
test_gene.R Testing gene method pathway PASS 4 0.012
test_genesPerGene.R Testing genePerGene gene as character PASS 2 0.005
test_genesPerGene.R Testing genePerGene gene as character PASS 2 0.006
test_genesPerGene.R Testing genePerGene gene as character PASS 2 0.005
test_genesPerPathway.R genesPerPathway default PASS 1 0.002
test_genesPerPathway.R genesPerPathway some pathway PASS 4 0.008
test_keep.R Estimating numbers double.factorial works PASS 2 0.003
test_keeps.R keep.R keepGPP works SKIPPED 1 0.001
test_keeps.R keep.R keepGPP works FAILED 1 0.003
test_modify.R Testing modify method gene as character PASS 6 0.025
test_modify.R Testing modify method pathway as character PASS 4 0.022
test_modify.R Testing modify method pathway as character PASS 2 0.019
test_nested.R Testing nested method nested PASS 2 0.003
test_nested.R Testing nested method compare PASS 6 0.043
test_pathway.R Testing pathway method pathway PASS 3 0.010
test_pathway.R Testing pathway method pathway PASS 4 0.015
test_simulations.R Testing simulations to create GeneSetCollections fromGPP_nGenes PASS 4 0.026
test_simulations.R Testing simulations to create GeneSetCollections fromPPG_nPathways PASS 5 0.167
test_simulations.R Testing simulations to create GeneSetCollections fromPPG_GPP PASS 4 0.109
test_sizes.R Testing sizePathways and sizeGenes Genes per Pathway and sizePathways PASS 3 0.007
test_sizes.R Testing sizePathways and sizeGenes Pathway per Genes and sizeGenes PASS 5 0.012
test_sizes.R Testing sizePathways and sizeGenes Pathway per Genes and sizeGenes PASS 3 0.009
test_sizes.R Testing sizePathways and sizeGenes Pathway per Genes and sizeGenes PASS 5 0.012
test_sizes.R Testing sizePathways and sizeGenes Same output sizeGenes PASS 3 0.010
test_sizes.R Testing sizePathways and sizeGenes Same output sizePathways PASS 3 0.010
test_sizesPer.R sizePathways PASS 2 0.005
test_sizesPer.R sizeGenes PASS 2 0.005
test_sizesPer.R sizePathways equivalent PASS 1 0.003
test_sizesPer.R sizePathways equivalent PASS 1 0.003
test_summary.R Testing summary method summary PASS 1 0.005
test_utilities.R Testing utilities method collectionType PASS 2 0.003
test_utilities.R Testing utilities method genesPerPathway PASS 3 0.004
test_utilities.R Testing utilities method pathwaysPerGene PASS 2 0.003
test_utilities.R Testing utilities method geneIdType PASS 2 0.002
test_utilities.R Testing utilities method nGenes PASS 1 0.001
test_utilities.R Testing utilities method nPathways PASS 1 0.002
test_utilities.R Testing utilities method h_index PASS 4 0.005
test_utilities.R Testing utilities method IC PASS 4 0.006
test_utilities.R Testing utilities method inverseList PASS 1 0.001
test_utilities.R Testing utilities method names_vec PASS 1 0.001
Session Info
Field Value
Version R version 3.5.1 (2018-07-02)
Platform x86_64-apple-darwin15.6.0 (64-bit)
Running macOS High Sierra 10.13.5
Language en_US
Timezone America/New_York
Package Version
testthat 2.0.0
covr 3.1.0
covrpage 0.0.52

@yonicd
Copy link
Owner

yonicd commented Sep 2, 2018

fork of your repo: https://github.com/yonicd/GSEAdv

@llrs
Copy link
Author

llrs commented Sep 2, 2018

Yes, on that commit there isn't any test failing.
The problems are when doing test driven development: when I first make a test and the function or method fails a test, covrpage doesn't build the tests/README.md

@yonicd
Copy link
Owner

yonicd commented Sep 2, 2018

There are failing tests in that commit

@llrs
Copy link
Author

llrs commented Sep 2, 2018

The covrpage report says that there are some errors, but the CI reports that all the test are passing, and the covr report is generated.
In my local machine all the test are OK, there's only one test skipped, but it pass the R CMD check.

@yonicd
Copy link
Owner

yonicd commented Sep 2, 2018

Not sure I follow.

covrpage (which is local): 3 errors + 1 fail
ci: no errors + no fails
local: no errors + no fails + 1 skip

how are you running local tests? devtools::test or testthat::test_dir or testthat::test_check?

this is getting farther from the original issue. maybe for the sake of length i'll close this one and you can open a fresh one with the updated problem.

@llrs
Copy link
Author

llrs commented Sep 3, 2018

I was running the tests with devtools::test using Rstudio. I'll open a new issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants