We have testing decorators that skip tests if something isn't importable - see `IPython.testing.decorators`.