It took me a while, but I found out that this causes segfaults when using Qt interactively. Refactoring into the lines below fixes that:

    ok = (has_pyglet() or has_qt() or has_glfw() or 
          has_glut(require_interactive=True))
    return np.testing.dec.skipif(not ok, 'Requires application backend')