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

Test "Output regression check" fails #189

Open
karldw opened this issue Nov 13, 2018 · 2 comments
Open

Test "Output regression check" fails #189

karldw opened this issue Nov 13, 2018 · 2 comments

Comments

@karldw
Copy link

karldw commented Nov 13, 2018

When I clone the repo and try to run the tests, I get a bunch of messages about "Output regression check" failing at this line. Here's the first one:

> devtools::test()
Loading tikzDevice
Ghostscript:  /usr/bin/gs 
compare:  /usr/bin/compare-im6.q16 
convert:  /usr/bin/convert-im6.q16 
Testing tikzDevice| OK F W S | Context| 13       | Test tikzDevice error and warning messages [1.7 s]
✖ |  2 1 1   | Draw a circle and some simple text [3.7 s]
────────────────────────────────────────────────────────────────────────────────
helper_graphics.R:65: warning: Output regression check
NAs introduced by coercion

helper_graphics.R:65: error: Output regression check
missing value where TRUE/FALSE needed
1: eval(bquote(expect_lt(compare_graph(.(short_name), tags), .(fuzz) + 0.1))) at tests/testthat/helper_graphics.R:65
2: eval(bquote(expect_lt(compare_graph(.(short_name), tags), .(fuzz) + 0.1)))
3: expect_lt(compare_graph("hello_TeX", tags), 0 + 0.1)
4: expect_compare("<", act, exp)
5: expect(op(diff, 0), sprintf("%s is %s %s. Difference: %.3g", act$lab, msg, exp$lab, 
       diff))
6: as.expectation.logical(ok, failure_message, info = info, srcref = srcref)

Trimmed session info:

package     * version date       lib source  
devtools      2.0.1   2018-10-26 [1] CRAN (R 3.5.1)
rlang         0.3.0.1 2018-10-25 [1] CRAN (R 3.5.1)
testthat    * 2.0.1   2018-10-13 [1] CRAN (R 3.5.1)
tikzDevice  * 0.12.2  2018-11-13 [?] Github (daqana/tikzDevice@d93d010)
@bellackn
Copy link

bellackn commented Nov 13, 2018

Hello @karldw, thanks for reporting. We are aware of this issue and currently working on updating the tests. Unfortunately, we have no ETA for this.
Adding a colorspace argument to compare_cmd seems to fix this issue:

shQuote(compare_cmd), "-density 300", "-metric AE",

If I put it like this, it works:

shQuote(compare_cmd), "-colorspace Gray -density 300", "-metric AE",

Probably the tests still won't run without errors after that (too large differences between compare file and test output) which seems to be related to the used ggplot2 versions. If you're interested in this, a PR is very welcome. :)

@karldw
Copy link
Author

karldw commented Nov 13, 2018

Good to know, and thanks for the quick response! I also don't have time to fix this in the near-term, but I'll keep it in mind.

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