In general it fails if there is on png() device.
TBH I am not sure if it is testthat's business to deal with graphic output at all, but at this point we might not be able to change this.
We could still use a more minimal device, e.g. the devoid package could be handy here?