You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After putting much effort into getting clipr to test properly on Travis (#14), there's still the issue of correctly testing whether clipr_available() actually does the job properly. Since we're using a build matrix on Travis, it's possible to explicitly test this function when we know that clipr ought to work (when DISPLAY=:90.0) and when it ought to fail (DISPLAY="").
This is the code I'm currently trying:
test_that("clipr_available fails when DISPLAY is not configured; succeeds when it is", {
# Only run this test on Travis
skip_if_not(identical(Sys.getenv("TRAVIS"), "true"))
if (identical(Sys.getenv("DISPLAY"), ""))
expect_false(clipr_available())
if (identical(Sys.getenv("DISPLAY"), ":90.0"))
expect_true(clipr_available())
})
Unfortunately, this test appears to fail when it ought to pass, clipr_available() returning FALSE when the Travis environment ought to be properly configured. Oddly, it fails even when incorporating the fix from #20
The text was updated successfully, but these errors were encountered:
For what it's worth, I just tested the version from #20, and it returns the correct answer within X (TRUE) and on a bare shell (FALSE).
I don't know TravisCI well enough to speculate what's going on. Can the R process see the DISPLAY variables? Is R under Travis built with X capabilities? What does capabilities("X11") say?
After putting much effort into getting clipr to test properly on Travis (#14), there's still the issue of correctly testing whether
clipr_available()
actually does the job properly. Since we're using a build matrix on Travis, it's possible to explicitly test this function when we know that clipr ought to work (whenDISPLAY=:90.0
) and when it ought to fail (DISPLAY=""
).This is the code I'm currently trying:
Unfortunately, this test appears to fail when it ought to pass,
clipr_available()
returningFALSE
when the Travis environment ought to be properly configured. Oddly, it fails even when incorporating the fix from #20The text was updated successfully, but these errors were encountered: