Python 2 compatibility on module level doctest