Skip to content

Tests using png("/dev/null") fail with bitmapType quartz #94

@ressy

Description

@ressy

I have some tests for plotting functions that use the equivalent of:

png("/dev/null")
doSomething()
dev.off()

...but on Mac OS this fails with:

Error in dev.off() : 
  QuartzBitmap_Output - unable to open file '/dev/null'

Using cairo (with options(bitmapType = "cairo") or png(..., type = "cairo")), like I see on Linux as the default, does fine. Alternatively a temporary file might be the better way to go. That would also test that the plotting doesn't fail with a platform's default bitmap device. There's already within_tmpdir in the test helpers that could be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions