Make workaround for py2 and doctest limitation.