There is a helper function in pytest importorskip that might help clean up testing code. This would generally replace something like @skipif('not HAS_DEPENDENCY') with a line inside the test function / method dependency = pytest.importorskip('dependency').
I'm not completely sure this is an overall win, but we should think about this as a new standard idiom.