From: Haoyu Bai Date: Sat, 2 Apr 2011 06:33:41 +0000 (+0800) Subject: better way to fool Python in the tests (now works in 2.5) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58bbbc39fff9b62c623a829fa49ecfab37260cb3;p=cython.git better way to fool Python in the tests (now works in 2.5) --- diff --git a/tests/run/relativeimport_T542.pyx b/tests/run/relativeimport_T542.pyx index c292cc60..27742145 100644 --- a/tests/run/relativeimport_T542.pyx +++ b/tests/run/relativeimport_T542.pyx @@ -2,9 +2,9 @@ import sys # fool Python we are in distutils if sys.version_info >= (3,): - __package__='distutils' + __name__='distutils.cytest_relativeimport_T542' else: - __package__=b'distutils' + __name__=b'distutils.cytest_relativeimport_T542' from distutils import cmd, core, version from .core import * diff --git a/tests/run/relativeimport_star_T542.pyx b/tests/run/relativeimport_star_T542.pyx index 39ceeaab..fde63a1e 100644 --- a/tests/run/relativeimport_star_T542.pyx +++ b/tests/run/relativeimport_star_T542.pyx @@ -1,5 +1,5 @@ from distutils import core, version -__package__ = 'distutils.core' # fool Python we are in distutils +__name__='distutils.core.cytest_relativeimport_T542' # fool Python we are in distutils from . import * __doc__ = """