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

Could output of package_coverage show the end of the failed file rather than beginning? #319

Closed
epurdom opened this issue May 24, 2018 · 1 comment

Comments

@epurdom
Copy link

epurdom commented May 24, 2018

Running package_coverage (via coveralls) is hitting an error in my tests. But the output from package_coverage only shows the top of the file with the error, which only shows information about loading the package, so that I can't see what the error is. It would be helpful if it instead showed the end of the file, where the error report would be. This would be particularly helpful on travisCI where I can't dig up the temporary file.

For example (from my clusterExperiment package on TravisCI) :

Error: Failure in `/tmp/RtmpZK4ee0/R_LIBS2f9638ab9b1b/clusterExperiment/clusterExperiment-tests/testthat.Rout.fail`
> library(testthat)
> library(clusterExperiment)
Loading required package: SingleCellExperiment
Loading required package: SummarizedExperiment
Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
    IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
    anyDuplicated, append, as.data.frame, basename, cbind, colMeans,
    colnames, colSums, dirname, do.call, duplicated, eval, evalq,
    Filter, Find, get, grep, g
Execution halted

I was actually really confused by this since there was no error reported.

However, when I finally figured out that I should run package_coverage locally (where I also get error with only top of the file shown like in travisCI), I went and looked at the temporary file it points out. There, the end of the file is the following, which is clearly more helpful!

── 1. Failure: check clusterLegend manipulations work as promised (@test_structu
`cc` not equal to `newcc`.
Attributes: < Component “transformation”: target, current do not match when deparsed >

══ testthat results  ═══════════════════════════════════════════════════════════
OK: 399 SKIPPED: 1 FAILED: 1
1. Failure: check clusterLegend manipulations work as promised (@test_structural_constructor.R#291) 

Error: testthat unit tests failed
Execution halted

Thanks,
Elizabeth Purdom

@epurdom epurdom changed the title Output of package_coverage show the end of the failed file rather than beginning Could output of package_coverage show the end of the failed file rather than beginning? May 24, 2018
@jimhester
Copy link
Member

Thanks for opening the issue and for your patience. The error message was being truncated because R only supports a limited size of the error message. However covr will now always include the end of the file rather than the beginning.

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

2 participants