Restore Python 3 compatibility
Skip all rendering tests when PIL is not available