Skip to content

Commit

Permalink
headless
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Jul 24, 2024
1 parent 07fee95 commit cdb2537
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/ijulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ html = read(testpath("ijulia.html"), String)
# create a folder ijulia_files with the exported images -- could be useful if we ever set up percy
# run(`$(jupyter_path) nbconvert $(testpath("ijulia.ipynb")) --to markdown`)

# these are the tests to get code coverage
# these are the tests to get code coverage
# nothing like a little piracy when testing in a headless setup
RCall.ijulia_init()
R"plot(1:10, 1:10)"
RCall.ijulia_displayplots()
# throws a method error when running headless !
@test_throws(MethodError, RCall.ijulia_displayplots())
RCall.ijulia_setdevice(MIME("image/svg+xml"))
R"plot(-1 * 1:10, -1 * 1:10)"
RCall.ijulia_displayplots()
# throws a method error when running headless !
@test_throws(MethodError, RCall.ijulia_displayplots())
RCall.ijulia_cleanup()

0 comments on commit cdb2537

Please sign in to comment.