better way to fool Python in the tests (now works in 2.5)
authorHaoyu Bai <baihaoyu@gmail.com>
Sat, 2 Apr 2011 06:33:41 +0000 (14:33 +0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 16 Apr 2011 07:36:30 +0000 (00:36 -0700)
tests/run/relativeimport_T542.pyx
tests/run/relativeimport_star_T542.pyx

index c292cc60612b2c966bf6a514be75e491b0f3c3fc..277421455e18444742e5940de640fd3625b89475 100644 (file)
@@ -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 *
index 39ceeaab86d7af2032bb759df0bdba404476769c..fde63a1e99a350a362394558719c58d08b03c6bf 100644 (file)
@@ -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__ = """