Export PDF tests: add a `condition` method which can be overwritten for disabling tests.